|
| struct | aest::colors::CommonAncestor< From, To > |
| | The closest common ancestor of two color spaces, as type; no type when they are in different trees. More...
|
| struct | aest::colors::CommonAncestor< From, To > |
| | The common ancestor when From is itself an ancestor of To. More...
|
| struct | aest::colors::Converter< ColorOut, ColorIn > |
| | Identity conversion between a color space and itself. More...
|
| struct | aest::colors::ParentSpace< BasicRGB< Gamut, tf::Linear > > |
| | A linear RGB space converts through XYZ, the root of the conversion tree, with the matrix of its gamut. More...
|
| struct | aest::colors::ParentSpace< BasicRGB< Gamut, Transfer > > |
| | An encoded RGB space converts through the linear space of its gamut. More...
|
| struct | aest::colors::ParentSpace< BasicHSL< RGB > > |
| | HSL converts through the RGB space it is a view of. More...
|
| struct | aest::colors::ParentSpace< BasicHSV< RGB > > |
| | HSV converts through the RGB space it is a view of. More...
|
| struct | aest::colors::Converter< RGB, BasicHSL< RGB > > |
| | Converts HSL to its RGB space. More...
|
| struct | aest::colors::Converter< BasicHSL< RGB >, RGB > |
| | Converts an RGB space to its HSL. More...
|
| struct | aest::colors::Converter< BasicHSV< RGB >, RGB > |
| | Converts an RGB space to its HSV. More...
|
| struct | aest::colors::Converter< RGB, BasicHSV< RGB > > |
| | Converts HSV to its RGB space. More...
|
| struct | aest::colors::Converter< BasicHSV< RGB >, BasicHSL< RGB > > |
| | Converts HSL to HSV over the same RGB space, a shortcut that keeps the hue exactly. More...
|
| struct | aest::colors::Converter< BasicHSL< RGB >, BasicHSV< RGB > > |
| | Converts HSV to HSL over the same RGB space, a shortcut that keeps the hue exactly. More...
|
| struct | aest::colors::Converter< BasicRGB< Gamut, tf::Linear >, BasicRGB< Gamut, Transfer > > |
| | Decodes an encoded RGB space to the linear space of its gamut. More...
|
| struct | aest::colors::Converter< BasicRGB< Gamut, Transfer >, BasicRGB< Gamut, tf::Linear > > |
| | Encodes the linear space of a gamut with a transfer function. More...
|
| struct | aest::colors::Converter< XYZ, BasicRGB< Gamut, tf::Linear > > |
| | Converts linear RGB to XYZ with the matrix of its gamut. More...
|
| struct | aest::colors::Converter< BasicRGB< Gamut, tf::Linear >, XYZ > |
| | Converts XYZ to linear RGB, clipping colors outside the gamut at 0. More...
|
|
| constexpr float | aest::colors::hue_of (const float r, const float g, const float b, const float max, const float delta) |
| | Hue of an sRGB color, shared by the HSL and HSV conversions.
|
| template<BoundedRGBSpace RGB> |
| constexpr RGB | aest::colors::rgb_from_hue (const float hue, const float chroma, const float offset, const float alpha) |
| | Builds an RGB color from a hue, a chroma and an offset, shared by the HSL and HSV conversions.
|
| template<ColorType Ancestor, ColorType Space> |
| constexpr Ancestor | aest::colors::ascend (const Space &color) |
| | Converts a color up the tree, parent by parent, to one of its ancestors.
|
| template<ColorType Descendant, ColorType Space> |
| constexpr Descendant | aest::colors::descend (const Space &color) |
| | Converts a color down the tree, child by child, to one of its descendants.
|
template<ColorType ColorOut, ColorType ColorIn>
requires ConvertibleTo<ColorOut, ColorIn> |
| constexpr ColorOut | aest::colors::convert (const ColorIn &color) |
| | Convert a color from one color space to another.
|
Partition aest.colors:converter: conversions between color spaces.
- Copyright
- Copyright (c) 2026 Davide Pierotti, MIT License (see LICENSE.md)
- Author
- Davide Pierotti
Definition in file Converter.cppm.
template<ColorType ColorOut, ColorType ColorIn>
requires ConvertibleTo<ColorOut, ColorIn>
| ColorOut aest::colors::convert |
( |
const ColorIn & | color | ) |
|
|
constexprexport |
Convert a color from one color space to another.
Uses the Converter specialization between the two spaces when there is one. Otherwise the color goes up the conversion tree to the closest ancestor the spaces share, and down from it to ColorOut; each step clamps to the range of its space.
- Template Parameters
-
| ColorOut | The desired color space |
| ColorIn | The current color space |
- Parameters
-
| [in] | color | The color to convert |
- Returns
- A new color representing the input value in another color space
Definition at line 265 of file Converter.cppm.