This is the script counterpart to the QColor type used in the C++ SDK.
Attention:
The alpha component of the color. In the range 0 to 255.
The blue component of the color. In the range 0 to 255.
The green component of the color. In the range 0 to 255.
The hue of the color as defined in the HSV color model.
The name of the color if it matches a named color, otherwise an empty string.
The red component of the color. In the range 0 to 255.
The color code of the color.
The saturation of the color as defined in the HSV color model.
The value of the color as defined in the HSV color model.
Color()
Default Constructor.
Sets the RGB value from colorName
, which may be in one of these formats (each of R, G and B is a single hex digit):
The color is invalid if name cannot be parsed.
Parameter(s):
Color( Number r, Number g, Number b, Number a=255 )
Component-wise constructor. Each value (i.e., r
, g
, b
, a
) should be in the [0, 255] range.
Parameter(s):
Color( Color color )
Copy Constructor.
Parameter(s):
Color : dark()
Return Value:
Return Value:
true
if the color is valid, otherwise false
.Since:
Color : light()
Return Value:
void : setRgb( Number r, Number g, Number b, Number a )
Sets the red, green, blue and alpha values of this color to r
, g
, b
and a
, respectively.
Parameter(s):
void : setRgb( Number r, Number g, Number b )
Sets the red, green and blue values of this color to r
, g
and b
, respectively.
Parameter(s):
void : setRgb( Number colorCode )
Sets the color code of the color. The value is a bitmask on the form 0xRRGGBB, where RR=red, GG=green, and BB=blue, all as hexadecimal digits.
Parameter(s):