aest 0.1.0
Collection of C++ utility libraries
Loading...
Searching...
No Matches
aest::colors::TransferFunction Concept Referenceexport

A transfer function tag, the second parameter of BasicRGB. More...

Concept definition

template<typename T>
concept TransferFunction = requires(const float value) {
{ T::PREFIX } -> std::convertible_to<std::string_view>;
{ T::encode(value) } -> std::same_as<float>;
{ T::decode(value) } -> std::same_as<float>;
{ T::clamp(value) } -> std::same_as<float>;
}
A transfer function tag, the second parameter of BasicRGB.
Definition Transfer.cppm:91

Detailed Description

A transfer function tag, the second parameter of BasicRGB.

A tag is a type with:

  • a static PREFIX, put before the gamut name in the color space name ("Lin" gives LinSRGB);
  • static encode(float) and decode(float), from linear light to the channel value and back;
  • a static clamp(float), bringing a channel value into the range of the encoding.
Template Parameters
TThe type to check

Definition at line 91 of file Transfer.cppm.