20 #ifndef ANTKEEPER_COLOR_SRGB_HPP
21 #define ANTKEEPER_COLOR_SRGB_HPP
47 return x > T{0.0031308} ?
std::pow(x, T{1.0 / 2.4}) * T{1.055} - T{0.055} : x * T{12.92};
50 return {f(x[0]), f(x[1]), f(x[2])};
67 return x > T{0.0031308 * 12.92} ?
std::pow((x + T{0.055}) / T{1.055}, T{2.4}) : x / T{12.92};
70 return {f(x[0]), f(x[1]), f(x[2])};
constexpr rgb_color_space< T > srgb({T{0.64}, T{0.33}}, {T{0.30}, T{0.60}}, {T{0.15}, T{0.06}}, deg2_d65< T >, &srgb_eotf< T >, &srgb_oetf< T >)
sRGB color space.
math::vec3< T > srgb_eotf(const math::vec3< T > &x)
sRGB electro-optical transfer function (EOTF).
math::vec3< T > srgb_oetf(const math::vec3< T > &x)
sRGB opto-electronic transfer function (OETF).
consteval T pow(T x, T e) noexcept
Compile-time pow for unsigned integrals.