|
aest 0.1.0
Collection of C++ utility libraries
|
A color in CIELab, the CIE 1976 L*a*b* space, relative to D50. More...
Public Member Functions | |
| constexpr | CIELab () |
| Default constructor initializes the color to opaque black (0, 0, 0, 1). | |
| constexpr | CIELab (const float l, const float a, const float b, const float alpha=1.0f) |
| Construct a color from CIELab values and alpha. | |
Color Channels | |
| constexpr float | lightness () const noexcept |
| Get the lightness, 100 being D50 white. | |
| constexpr float | a () const noexcept |
| Get the green-red axis, negative toward green. | |
| constexpr float | b () const noexcept |
| Get the blue-yellow axis, negative toward blue. | |
| Public Member Functions inherited from aest::colors::ColorBase< CIELab > | |
| 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 CIELab | 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 = "CIELab" |
| Color space name, used by the std::formatter specialization. | |
Additional Inherited Members | |
| Public Attributes inherited from aest::colors::ColorBase< CIELab > | |
| friend | Derived |
| Lets the derived color reach the private constructor and channels. | |
A color in CIELab, the CIE 1976 L*a*b* space, relative to D50.
L is the lightness, 0 for black and 100 for the D50 white; a runs from green to red and b from blue to yellow, both 0 for grays. The white point and its Bradford adaptation from D65 are the ones of CSS Color 4, so the values match CSS lab(). CIELab is the space of the CIE color difference formulas, de_76(), de_94() and de_2000(); OKLab is more even across hues for gradients and adjustments. Channels are not clamped: HDR colors have L above 100.
Definition at line 71 of file CieLab.cppm.
|
inlineconstexpr |
Default constructor initializes the color to opaque black (0, 0, 0, 1).
Definition at line 78 of file CieLab.cppm.
|
inlineconstexpr |
Construct a color from CIELab values and alpha.
| [in] | l | Lightness, 100 being D50 white |
| [in] | a | Green-red axis |
| [in] | b | Blue-yellow axis |
| [in] | alpha | Alpha channel value (default 1.0) |
Definition at line 90 of file CieLab.cppm.
|
inlinenodiscardconstexprnoexcept |
Get the green-red axis, negative toward green.
Definition at line 106 of file CieLab.cppm.
|
inlinenodiscardconstexprnoexcept |
Get the blue-yellow axis, negative toward blue.
Definition at line 112 of file CieLab.cppm.
|
inlinenodiscardconstexprnoexcept |
Get the lightness, 100 being D50 white.
Definition at line 100 of file CieLab.cppm.
|
staticconstexpr |
Color space name, used by the std::formatter specialization.
Definition at line 75 of file CieLab.cppm.