Color Object |
A color object represents a solid color and optional alpha component. Color objects are used within most objects. The alpha component allows specification of translucency.
Caution |
---|
Translucency can slow down rendering, and is ignored when panning, so should only be used when it is the only way to achieve a specific result. |
(red, green, blue[, alpha])
(255,0,0) // The color Red (128,128,128,128) // 50% gray shade, 50% opacity
The red component of the color, in integer units between 0 and 255 (inclusive)
The green component of the color, in integer units between 0 and 255 (inclusive)
The blue component of the color, in integer units between 0 and 255 (inclusive)
The alpha component of the color, in integer units between 0 and 255 (inclusive), where a higher number is more opaque. This component is optional.