.. # split from OESystemFunctions.rst:1022

.. include:: ../substitutions

.. oe:namespace:: OESystem

.. meta::
   :keywords: OEGetColors

..  _OESystem_OEGetColors:

.. oe:function:: OEGetColors

   .. oe:language:: c++ java csharp

      .. oe:api::

         OEIterBase<OEColor>* OEGetColors(const std::vector<OEColor>& colors)

   .. oe:language:: python

      .. oe:api:: python

         OEGetColors(colors: OEColorVec) -> Iterable[OEColor]

   Returns the iterator from the vector of specified colors in the vector order, enabling
   setting a custom color iterator.

   .. oe:language:: c++ java csharp

      .. oe:api::

         OEIterBase<OEColor>* OEGetColors(const OEColor& fromcolor,
                                          const OEColor& tocolor,
                                          unsigned int nrcolors)

   .. oe:language:: python

      .. oe:api:: python

         OEGetColors(fromcolor: OEColor, tocolor: OEColor, nrcolors: int) -> Iterable[OEColor]

   Returns the iterator over `nrcolors` colors between the two
   given colors using a :ref:`OELinearColorGradient <OESystem_OELinearColorGradient>` class.
   See example in :ref:`Figure: The ten colors that are returned from OEYellow
   to OEDarkRed colors<figure_OEGetColors>`.

   .. _figure_OEGetColors:

   .. figure:: ../images/OEGetColors.*
      :align:  center

      **The ten colors that are returned from OEYellow to OEDarkRed colors**

