Representation for the hue-saturation-value-alpha color model.
See Wikipedia for details on color models.
Definition at line 216 of file ge211_color.h.
Public Member Functions | |
Color | to_rgba () const noexcept |
Converts color to the RGBA color model. | |
Transformations | |
HSVA | rotate_hue (double degrees) const noexcept |
Returns a color by rotating the hue, leaving the other properties constant. More... | |
HSVA | saturate (double unit_amount) const noexcept |
Produces a fuller tone by saturating the color. More... | |
HSVA | desaturate (double unit_amount) const noexcept |
Produces a weaker tone by desaturating the color. More... | |
HSVA | revalue (double unit_amount) const noexcept |
Produces a brighter color by increasing the value. More... | |
HSVA | devalue (double unit_amount) const noexcept |
Produces a darker color by decreasing the value. More... | |
HSVA | fade_in (double unit_amount) const noexcept |
Increases opacity of the color. More... | |
HSVA | fade_out (double unit_amount) const noexcept |
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). More... | |
double | value |
The brightness of the color, from 0.0 (black) to 1.0 (fully colored). More... | |
double | alpha |
The opacity of the color, from 0.0 (fully transparent) to 1.0 (fully opaque). More... | |
|
noexcept |
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 243 of file ge211_color.cpp.
|
noexcept |
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 253 of file ge211_color.cpp.
|
noexcept |
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 258 of file ge211_color.cpp.
|
noexcept |
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 263 of file ge211_color.cpp.
|
noexcept |
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 248 of file ge211_color.cpp.
|
noexcept |
Returns a color by rotating the hue, leaving the other properties constant.
Definition at line 231 of file ge211_color.cpp.
|
noexcept |
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 238 of file ge211_color.cpp.
double alpha |
The opacity of the color, from 0.0 (fully transparent) to 1.0 (fully opaque).
Definition at line 228 of file ge211_color.h.
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 219 of file ge211_color.h.
double saturation |
The fullness of the color, from 0,0 (grey) to 1.0 (fully saturated).
Definition at line 222 of file ge211_color.h.
double value |
The brightness of the color, from 0.0 (black) to 1.0 (fully colored).
Definition at line 225 of file ge211_color.h.