|
aest 0.1.0
Collection of C++ utility libraries
|
A color in CIELCH: CIELab in polar form, as lightness, chroma and hue. More...
Public Member Functions | |
| constexpr | CIELCH () |
| Default constructor initializes the color to opaque black (0, 0, 0, 1). | |
| constexpr | CIELCH (const float l, const float c, const float h, const float alpha=1.0f) |
| Construct a color from CIELCH values and alpha. | |
Color Channels | |
| constexpr float | lightness () const noexcept |
| Get the lightness, 100 being D50 white. | |
| constexpr float | chroma () const noexcept |
| Get the chroma, the distance from gray. | |
| constexpr float | hue () const noexcept |
| Get the hue angle in the 0-360 range. | |
| Public Member Functions inherited from aest::colors::ColorBase< CIELCH > | |
| 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 CIELCH | 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 = "CIELCH" |
| Color space name, used by the std::formatter specialization. | |
Additional Inherited Members | |
| Public Attributes inherited from aest::colors::ColorBase< CIELCH > | |
| friend | Derived |
| Lets the derived color reach the private constructor and channels. | |
A color in CIELCH: CIELab in polar form, as lightness, chroma and hue.
The values match CSS lch(). The hue is wrapped to the [0, 360) range and chroma clamped at 0; for grays, whose chroma is 0, the hue has no meaning. Lightness is not clamped.
Definition at line 124 of file CieLab.cppm.
|
inlineconstexpr |
Default constructor initializes the color to opaque black (0, 0, 0, 1).
Definition at line 131 of file CieLab.cppm.
|
inlineconstexpr |
Construct a color from CIELCH values and alpha.
| [in] | l | Lightness, 100 being D50 white |
| [in] | c | Chroma, clamped at 0 |
| [in] | h | Hue in degrees, wrapped to the 0-360 range |
| [in] | alpha | Alpha channel value (default 1.0) |
Definition at line 143 of file CieLab.cppm.
|
inlinenodiscardconstexprnoexcept |
Get the chroma, the distance from gray.
Definition at line 159 of file CieLab.cppm.
|
inlinenodiscardconstexprnoexcept |
Get the hue angle in the 0-360 range.
Definition at line 165 of file CieLab.cppm.
|
inlinenodiscardconstexprnoexcept |
Get the lightness, 100 being D50 white.
Definition at line 153 of file CieLab.cppm.
|
staticconstexpr |
Color space name, used by the std::formatter specialization.
Definition at line 128 of file CieLab.cppm.