|
aest 0.1.0
Collection of C++ utility libraries
|
The sRGB transfer function of IEC 61966-2-1: a short linear segment near black, then a power curve with exponent 2.4. More...
Static Public Member Functions | |
| static float | encode (const float value) |
| Encodes linear light into an sRGB channel value. | |
| static float | decode (const float value) |
| Decodes an sRGB channel value to linear light. | |
| static constexpr float | clamp (const float value) |
| Brings a channel value into the encoded range. | |
Static Public Attributes | |
| static constexpr std::string_view | PREFIX = "" |
| Prefix of the color space name: none, encoded spaces go by the gamut name. | |
The sRGB transfer function of IEC 61966-2-1: a short linear segment near black, then a power curve with exponent 2.4.
Channels are clamped to the 0-1 range. Display P3 uses it too.
Definition at line 166 of file Transfer.cppm.
|
inlinestaticconstexpr |
Brings a channel value into the encoded range.
| [in] | value | The channel value |
value clamped to the 0-1 range Definition at line 205 of file Transfer.cppm.
|
inlinestatic |
Decodes an sRGB channel value to linear light.
| [in] | value | The encoded value in the 0-1 range |
Definition at line 192 of file Transfer.cppm.
|
inlinestatic |
Encodes linear light into an sRGB channel value.
| [in] | value | The linear value, 0 or greater |
Definition at line 177 of file Transfer.cppm.
|
staticconstexpr |
Prefix of the color space name: none, encoded spaces go by the gamut name.
Definition at line 169 of file Transfer.cppm.