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