Representation for the hue-saturation-value-alpha color model.
See Wikipedia for details on color models.
Definition at line 229 of file ge211_color.hxx.
Public Member Functions | |
HSVA (double hue, double saturation, double value, double alpha=1.0) | |
Constructs a hue-saturation-value-alpha color from its unit interval components. | |
Color | to_rgba () const |
Converts color to the RGBA color model. | |
Transformations | |
HSVA | rotate_hue (double degrees) const |
Returns a color by rotating the hue, leaving the other properties constant. | |
HSVA | saturate (double unit_amount) const |
Produces a fuller tone by saturating the color. More... | |
HSVA | desaturate (double unit_amount) const |
Produces a weaker tone by desaturating the color. More... | |
HSVA | revalue (double unit_amount) const |
Produces a brighter color by increasing the value. More... | |
HSVA | devalue (double unit_amount) const |
Produces a darker color by decreasing the value. More... | |
HSVA | fade_in (double unit_amount) const |
Increases opacity of the color. More... | |
HSVA | fade_out (double unit_amount) const |
Decreases opacity of the color. More... | |
Public Attributes | |
double | hue |
The hue in degrees from 0 to 360. More... | |
double | saturation |
The fullness of the color, from 0,0 (grey) to 1.0 (fully saturated). | |
double | value |
The brightness of the color, from 0.0 (black) to 1.0 (fully colored). | |
double | alpha |
The opacity of the color, from 0.0 (fully transparent) to 1.0 (fully opaque). | |
Color::HSVA desaturate | ( | double | unit_amount | ) | const |
Produces a weaker tone by desaturating the color.
The unit_amount
must be between 0 and 1, where 0 leaves the color the same, and 1 produces gray at the same lightness as the original color.
Definition at line 273 of file ge211_color.cxx.
Color::HSVA devalue | ( | double | unit_amount | ) | const |
Produces a darker color by decreasing the value.
The unit_amount
must be between 0 and 1, where 0 leaves the color the same, and 1 produces black.
Definition at line 283 of file ge211_color.cxx.
Color::HSVA fade_in | ( | double | unit_amount | ) | const |
Increases opacity of the color.
The unit_amount
must be between 0 and 1, where 0 leaves the color the same, and 1 produces a fully opaque color.
Definition at line 288 of file ge211_color.cxx.
Color::HSVA fade_out | ( | double | unit_amount | ) | const |
Decreases opacity of the color.
The // unit_amount
must be between 0 and 1, where 0 leaves the color the same, and 1 produces full transparency.
Definition at line 293 of file ge211_color.cxx.
Color::HSVA revalue | ( | double | unit_amount | ) | const |
Produces a brighter color by increasing the value.
The unit_amount
must be between 0 and 1, where 0 leaves the color the same, and 1 produces a fully bright color.
Definition at line 278 of file ge211_color.cxx.
Color::HSVA saturate | ( | double | unit_amount | ) | const |
Produces a fuller tone by saturating the color.
The unit_amount
must be between 0 and 1, where 0 leaves the color the same, and 1 produces a fully saturated color.
Definition at line 268 of file ge211_color.cxx.
double hue |
The hue in degrees from 0 to 360.
0° (and 360°) is red, 120° is green, and 240° is blue.
Definition at line 233 of file ge211_color.hxx.