|
aest 0.1.0
Collection of C++ utility libraries
|
A color as hue, saturation and value (brightness), over the encoded RGB space RGB.
More...
Public Member Functions | |
| constexpr | BasicHSV () |
| Default constructor initializes the color to opaque black (0, 0, 0, 1). | |
| constexpr | BasicHSV (const float h, const float s, const float v, const float a=1.0f) |
| Construct a color from floating-point HSVA values. | |
Color Channels | |
| constexpr float | hue () const noexcept |
| Get the hue value in the 0-360 range. | |
| constexpr float | saturation () const noexcept |
| Get the saturation value in the 0-1 range. | |
| constexpr float | brightness () const noexcept |
| Get the brightness value in the 0-1 range. | |
| Public Member Functions inherited from aest::colors::ColorBase< BasicHSV< RGB > > | |
| constexpr float | alpha () const noexcept |
| Get the alpha channel value in the 0-1 range. | |
| constexpr float | ch1 () const noexcept |
| Get the first channel value. | |
| constexpr float | ch2 () const noexcept |
| Get the second channel value. | |
| constexpr float | ch3 () const noexcept |
| Get the third channel value. | |
| constexpr BasicHSV< RGB > | opacity (const float alpha) const |
| Returns a new color with the same channels and the specified alpha value. | |
Static Public Attributes | |
| static constexpr std::string_view | TYPE |
| Color space name, used by the std::formatter specialization. | |
Static Private Attributes | |
| static constexpr std::string_view | MODEL = "HSV" |
| Name of the model, the whole space name over SRGB. | |
| static constexpr auto | QUALIFIED_CHARS |
| The space name over another RGB space, HSV< + RGB::TYPE + >. | |
Additional Inherited Members | |
| Public Attributes inherited from aest::colors::ColorBase< BasicHSV< RGB > > | |
| friend | Derived |
| Lets the derived color reach the private constructor and channels. | |
A color as hue, saturation and value (brightness), over the encoded RGB space RGB.
HSV rearranges the channels of RGB, so it covers the same gamut. The hue is wrapped to the [0, 360) range; saturation and value are clamped to the 0-1 range. Convert to any other space with convert().
| RGB | The encoded RGB space, such as SRGB: its channels must be in the 0-1 range, so linear spaces are rejected. |
Definition at line 99 of file Cylindrical.cppm.
|
inlineconstexpr |
Default constructor initializes the color to opaque black (0, 0, 0, 1).
Definition at line 115 of file Cylindrical.cppm.
|
inlineconstexpr |
Construct a color from floating-point HSVA values.
| [in] | h | Hue in degrees, wrapped to the 0-360 range |
| [in] | s | Saturation value |
| [in] | v | Brightness value |
| [in] | a | Alpha channel value (default 1.0) |
Definition at line 127 of file Cylindrical.cppm.
|
inlinenodiscardconstexprnoexcept |
Get the brightness value in the 0-1 range.
Definition at line 149 of file Cylindrical.cppm.
|
inlinenodiscardconstexprnoexcept |
Get the hue value in the 0-360 range.
Definition at line 137 of file Cylindrical.cppm.
|
inlinenodiscardconstexprnoexcept |
Get the saturation value in the 0-1 range.
Definition at line 143 of file Cylindrical.cppm.
|
staticconstexprprivate |
Name of the model, the whole space name over SRGB.
Definition at line 102 of file Cylindrical.cppm.
|
staticconstexprprivate |
The space name over another RGB space, HSV< + RGB::TYPE + >.
Definition at line 105 of file Cylindrical.cppm.
|
staticconstexpr |
Color space name, used by the std::formatter specialization.
Definition at line 110 of file Cylindrical.cppm.