.. # split from OESystemFunctions.rst:495

.. include:: ../substitutions

.. oe:namespace:: OESystem

.. meta::
   :keywords: OEColorCreate

.. oe:function:: OEColorCreate

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

      .. oe:api::

         OEColor OEColorCreate(double r, double g, double b)
         OEColor OEColorCreate(double r, double g, double b, double a)

   .. oe:language:: python

      .. oe:api:: python

         OEColorCreate(r: float, g: float, b: float) -> OEColor
         OEColorCreate(r: float, g: float, b: float, a: float) -> OEColor


   Creates 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


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

