aest 0.1.0
Collection of C++ utility libraries
Loading...
Searching...
No Matches
Space.cppm
Go to the documentation of this file.
1
9module;
10#include <type_traits>
11export module aest.colors:space;
12
13import :color;
14import :cylindrical;
15import :gamut;
16import :transfer;
17
18namespace aest::colors
19{
28export template <typename Space>
29struct In
30{};
31
37export template <ColorType Space>
38inline constexpr In<Space> in{};
39
51export template <ColorType Color>
53{
55 using type = LinSRGB;
56};
57
63template <RGBGamut Gamut, TransferFunction Transfer>
64struct LinearSpaceOf<BasicRGB<Gamut, Transfer>>
65{
68};
69
74template <BoundedRGBSpace RGB>
76{
79};
80
85template <BoundedRGBSpace RGB>
87{
90};
91
93template <>
95{
97 using type = XYZ;
98};
99
106template <typename Space, ColorType Color>
108 std::conditional_t<std::is_void_v<Space>, typename LinearSpaceOf<Color>::type, Space>;
109} // namespace aest::colors
BasicRGB< gamut::SRGB, tf::Linear > LinSRGB
Linear sRGB: the sRGB primaries without the gamma encoding, so channels are proportional to light and...
Definition Gamut.cppm:376
std::conditional_t< std::is_void_v< Space >, typename LinearSpaceOf< Color >::type, Space > WorkingSpace
The working space of an operation that follows its input: Space when given, the LinearSpaceOf Color w...
Definition Space.cppm:107
constexpr In< Space > in
Selects the color space an operation works in, e.g. lighten(color, 0.2f, in<HSL>).
Definition Space.cppm:38
A color as hue, saturation and lightness, over the encoded RGB space RGB.
A color as hue, saturation and value (brightness), over the encoded RGB space RGB.
A color in an RGB color space: the primaries and white point of Gamut, with channels encoded by Trans...
Definition Gamut.cppm:296
A color in the CIE 1931 XYZ color space, relative to the D65 white point.
Definition Color.cppm:390
Tag naming the color space an operation works in.
Definition Space.cppm:30
typename LinearSpaceOf< RGB >::type type
The linear space.
Definition Space.cppm:78
typename LinearSpaceOf< RGB >::type type
The linear space.
Definition Space.cppm:89
BasicRGB< Gamut, tf::Linear > type
The linear space.
Definition Space.cppm:67
XYZ type
The linear space.
Definition Space.cppm:97
The linear space that operations in linear light, such as mix() and over(), use for a color type when...
Definition Space.cppm:53
LinSRGB type
The linear space.
Definition Space.cppm:55