Inheritance diagram for Color:
Properties | |
Number | blue |
Number | green |
Number | hue |
String | name |
Number | red |
Number | rgb |
Number | saturation |
Number | value |
Constructors | |
Color (String colorName) | |
Color (Color color) | |
Color (Number r, Number g, Number b) | |
Color () | |
Methods | |
Color | dark () |
Color | light () |
void | setRgb (Number r, Number g, Number b) |
void | setRgb (Number colorCode) |
This is the DAZ Script counterpart of the QColor type used in the DAZ Studio SDK.
Color::Color | ( | ) |
Default Constructor.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Component-wise constructor. Each value ( r
, g
, b
) should be in the range [0 - 255].
r | The red value for the color | |
g | The green value for the color | |
b | The blue value for the color |
Color::Color | ( | Color | color | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Copy constructor
color | The color to copy |
Color::Color | ( | String | colorName | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 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): -#RGB -#RRGGBB -#RRRGGGBBB -#RRRRGGGGBBBB -A name from the color database. The color is invalid if name cannot be parsed.
colorName | The named color to set the value of this color to. |
Sets the red, green and blue color values of this Color to r
, g
and b
, respectively.
r | The new Red value for the color | |
g | The new Green value for the color | |
b | The new Blue value for the color |
void Color::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.
colorCode | The encoded value for the color |
The red component of the color. In the range 0 to 255.
The red 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.