[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.19.6 Color object

Allows you to create an encapsulation of a color. Color components may range from 0.0 to 1.0, where the 0 is no intensity and 1 is full intensity of that component.

constructor: new Color(r,g,b,a)

Set the color components and return a new Color object.

Set(r,g,b,a)

Set the color components.

An example of creating a new Color object:

 
my_color = new Color(1,0.5,1,0.5);

You can also access the components of a Color object through it's properties.

r

Return the red component.

g

Return the green component.

b

Return the blue component.

alpha

Return the alpha component.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated using texi2html 1.76.