.. role:: ts-api-decorator

######
Color3
######

.. js:module:: cee
   :noindex:

.. container:: ts-api-section

   .. js:class:: Color3

      An immutable three component (RGB) color.

      The color components (r,g,b) 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.Color3.constructor`



.. container:: api-index-section

   .. rubric:: Properties

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

   * :js:attr:`~cee.Color3.b`
   * :js:attr:`~cee.Color3.g`
   * :js:attr:`~cee.Color3.r`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.Color3.equals`
   * :js:meth:`~cee.Color3.from`
   * :js:meth:`~cee.Color3.fromArray`
   * :js:meth:`~cee.Color3.fromColor4`





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

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

.. container:: ts-api-section

   .. js:function:: Color3.constructor( r, g, b)

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


      Creates a color object.


      :rtype: Color3



Properties
==========

.. container:: ts-api-section

   .. js:attribute:: Color3.b

      :type: number

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



.. container:: ts-api-section

   .. js:attribute:: Color3.g

      :type: number

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



.. container:: ts-api-section

   .. js:attribute:: Color3.r

      :type: number

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



Methods
=======

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

equals
------

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

   :param other: None
   :type other: Color3Like


   Returns true if the colors are equal.


   :rtype: boolean

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

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

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

   :param color: None
   :type color: Color3Like


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


   :rtype: Color3

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

:ts-api-decorator:`static` fromArray
------------------------------------

.. js:method:: Color3.fromArray( arr)

   :param arr: None
   :type arr: ArrayLike <number>


   Creates a new Color3 instance from the first 3 elements of the given array.


   :rtype: Color3

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

:ts-api-decorator:`static` fromColor4
-------------------------------------

.. js:method:: Color3.fromColor4( color)

   :param color: None
   :type color: Color4Like


   Creates a Color3 instance from the r,g,b properties of the given RGBA color, ignoring the alpha channel


   :rtype: Color3

