.. role:: ts-api-decorator

######
Color4
######

.. js:module:: cee
   :noindex:

.. container:: ts-api-section

   .. js:class:: Color4

      An immutable four component (RGBA) color.

      The color components (r,g,b,a) are in the range 0..1 

      Note that this class is immutable.



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~cee.Color4.constructor`



.. container:: api-index-section

   .. rubric:: Properties

   .. rst-class:: api-index-list-item api-kind-property api-parent-kind-class

   * :js:attr:`~cee.Color4.a`
   * :js:attr:`~cee.Color4.b`
   * :js:attr:`~cee.Color4.g`
   * :js:attr:`~cee.Color4.r`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~cee.Color4.equals`
   * :js:meth:`~cee.Color4.from`





------------

Constructors
============

.. container:: ts-api-section

   .. js:function:: Color4.constructor( r, g, b, a)

      :param r: None
      :type r: number
      :param g: None
      :type g: number
      :param b: None
      :type b: number
      :param a: None
      :type a: number


      Creates a color object


      :rtype: Color4



Properties
==========

.. container:: ts-api-section

   .. js:attribute:: Color4.a

      :type: number

      The alpha component of the color. Range: 0..1, where 1 is fully opaque and 0 is fully transparent (invisible)



.. container:: ts-api-section

   .. js:attribute:: Color4.b

      :type: number

      The blue component of the color. Range: 0..1



.. container:: ts-api-section

   .. js:attribute:: Color4.g

      :type: number

      The green component of the color. Range: 0..1



.. container:: ts-api-section

   .. js:attribute:: Color4.r

      :type: number

      The red component of the color. Range: 0..1



Methods
=======

.. rst-class:: ts-api-section

equals
------

.. js:method:: Color4.equals( other)

   :param other: None
   :type other: Color4Like


   Returns true if the colors are equal


   :rtype: boolean

.. rst-class:: ts-api-section

:ts-api-decorator:`static` from
-------------------------------

.. js:method:: Color4.from( color)

   :param color: None
   :type color: Color4Like


   Creates a Color4 instance from any object with r,g,b,a properties


   :rtype: Color4

