Color( r, g, b )

constructor

Create a new Color and initialize it with red, green and blue values. The values should be in the range 0 to 1, where 1 is full intensity and 0 is no intensity.

Arguments

Name Type Description
r Number Red component of the new color in the range 0 to 1
g Number Green component of the new color in the range 0 to 1
b Number Blue component of the new color in the range 0 to 1

Returns

Type Description
Color The new Color with red, green and blue components as specified in the arguments to the constructor