Inherits ScriptObject.
Public Member Functions | |
| Color () | |
| Color (Number red, Number green, Number blue) | |
| Color (Number red, Number green, Number blue, Number alpha) | |
| Number | getRed () |
| Number | getGreen () |
| Number | getBlue () |
| Number | getAlpha () |
| String | toString () |
Color specified by red, green, blue, and alpha values.
| Color | ( | ) |
Initializes a new color as opaque white.
Initializes a new color as opaque (i.e. alpha equal to 1). All arguments are clamped to the range [0; 1].
| red | Red component. |
| green | Green component. |
| blue | Blue component. |
Initializes a new color. All arguments are clamped to the range [0; 1].
| red | Red component. |
| green | Green component. |
| blue | Blue component. |
| alpha | Alpha component. |
| Number getAlpha | ( | ) |
Returns the alpha component.
| Number getBlue | ( | ) |
Returns the blue component.
| Number getGreen | ( | ) |
Returns the green component.
| Number getRed | ( | ) |
Returns the red component.
| String toString | ( | ) |
Converts the color to a string (e.g. [0.25, 0.25, 0.75, 1]).