.. # split from OESystemFunctions.rst:571

.. include:: ../substitutions

.. oe:namespace:: OESystem

.. meta::
   :keywords: OEColorSet

.. oe:function:: OEColorSet

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

      .. oe:api::

         void OEColorSet(OEColor &, double r, double g, double b)
         void OEColorSet(OEColor &, double r, double g, double b, double a)

   .. oe:language:: python

      .. oe:api:: python

         OEColorSet(arg1: OEColor, r: float, g: float, b: float) -> None
         OEColorSet(arg1: OEColor, r: float, g: float, b: float, a: float) -> None

   Sets a color with the specified color components that are mapped
   into the internal representation in the range ``[0, 255]``.

   *r, g, b*
      The red, green and blue components of the color.
      These numbers have to be in the range ``[0.0, 1.0]``.
      Setting a color to be opaque black is equivalent to
      :oe:func:`OESystem::OEColorSet` (0.0, 0.0, 0.0).

   *a*
      The alpha value defines the transparency of a color and can be
      represented by a float value in the range ``[0.0, 1.0]``.
      An alpha value of ``1.0`` means that the color is completely opaque and
      an alpha value of ``0.0``  means that the color is completely transparent.
      If the alpha value is not specified, then a completely opaque
      color is created.

   .. note::

      The components of the color are always clamped into the range
      ``[0, 255]`` that is the internal representation of the color.


   .. seealso::

      * :ref:`OEColor <OESystem_OEColor>` class
      * :oe:func:`OESystem::OEColorGet` function


.. ################################################################
   #
   ################################################################

