|
aest 0.1.0
Collection of C++ utility libraries
|
Concepts | |
| concept | aest::colors::PackableRGB |
| A color whose channels are red, green and blue: any RGB space, or the premultiplied form of a linear one. | |
| concept | aest::colors::PackableLinearRGB |
| A color whose channels are linear red, green and blue: a linear RGB space, or its premultiplied form. | |
| concept | aest::colors::LightnessSpace |
| A color space whose lightness can be read and replaced through Lightness. | |
| concept | aest::colors::InterpolationSpace |
| A color space whose colors can be interpolated through Interpolation. | |
| concept | aest::colors::HueInterpolationSpace |
| A color space with a hue, whose Interpolation takes a HueMode. | |
| concept | aest::colors::SaturationSpace |
| A color space whose saturation can be read and replaced through Saturation. | |
| concept | aest::colors::BoundedSaturationSpace |
| A SaturationSpace whose saturation has a maximum, Saturation::MAX. | |
| concept | aest::colors::HueSpace |
| A color space whose hue can be read and replaced through Hue. | |
| concept | aest::colors::TransferFunction |
| A transfer function tag, the second parameter of BasicRGB. | |
| concept | aest::colors::HDRTransfer |
| A transfer function for HDR signals, such as PQ or HLG: a tag with a static IS_HDR set to true. Tags without it are SDR. | |
| concept | aest::colors::RandomBitGenerator |
| A uniform random bit generator whose every output bit is random: its range is a power of two, of at least 2^24. | |
| concept | aest::colors::ConvertibleTo |
A color space that convert() can convert ColorIn to: directly through a Converter, or along the conversion tree. | |
| concept | aest::colors::ColorType |
| Concept to check if a type is a color. | |
| concept | aest::colors::LinearSpace |
| A color space whose channels are proportional to light, so that adding and scaling them is physically meaningful. | |
| concept | aest::colors::RGBGamut |
| A gamut tag, the first parameter of BasicRGB. | |
| concept | aest::colors::RGBSpace |
| Any BasicRGB color space. | |
| concept | aest::colors::LinearRGBSpace |
| A BasicRGB space with linear channels, tf::Linear. | |
| concept | aest::colors::BoundedRGBSpace |
| A BasicRGB space with an SDR encoding: channels in the 0-1 range, relative to the display's white. Linear spaces and HDR signals such as PQ are left out. | |
| concept | aest::colors::EuclideanSpace |
| A color space in which euclidean() can measure distances through Euclidean. | |
Classes | |
| class | aest::colors::OKLab |
| A color in OKLab, the perceptual space by Björn Ottosson. More... | |
| class | aest::colors::OKLCH |
| A color in OKLCH: OKLab in polar form, as lightness, chroma and hue. More... | |
| struct | aest::colors::In< Space > |
| Tag naming the color space an operation works in. More... | |
| struct | aest::colors::LinearSpaceOf< Color > |
| The linear space that operations in linear light, such as mix() and over(), use for a color type when no space is given. More... | |
| struct | aest::colors::Lightness< Space > |
| Reads and replaces the lightness of a color space. More... | |
| struct | aest::colors::Interpolation< Space > |
| Interpolates between two colors of a color space. More... | |
| struct | aest::colors::Saturation< Space > |
| Reads and replaces the saturation of a color space: how far a color is from the gray of its lightness. More... | |
| struct | aest::colors::Hue< Space > |
| Reads and replaces the hue of a color space, in degrees. More... | |
| struct | aest::colors::tf::Linear |
| No transfer function: channel values are proportional to light. More... | |
| struct | aest::colors::tf::SRGB |
| The sRGB transfer function of IEC 61966-2-1: a short linear segment near black, then a power curve with exponent 2.4. More... | |
| struct | aest::colors::tf::Rec709 |
| The OETF of ITU-R BT.709, which BT.2020 shares for SDR: a linear segment near black, then a power curve with exponent 0.45. More... | |
| struct | aest::colors::tf::PQ |
| The Perceptual Quantizer of SMPTE ST 2084 and ITU-R BT.2100, the absolute HDR transfer function of HDR10 and Dolby Vision. More... | |
| struct | aest::colors::tf::HLG |
| The Hybrid Log-Gamma OETF of ITU-R BT.2100 and ARIB STD-B67, the relative HDR transfer function of broadcast. More... | |
| class | aest::colors::BasicHSL< RGB > |
A color as hue, saturation and lightness, over the encoded RGB space RGB. More... | |
| class | aest::colors::BasicHSV< RGB > |
A color as hue, saturation and value (brightness), over the encoded RGB space RGB. More... | |
| struct | aest::colors::Converter< ColorOut, ColorIn > |
| Converts colors from one color space to another. More... | |
| struct | aest::colors::ParentSpace< Space > |
| Names the color space a space converts through, joining every space in one tree. More... | |
| struct | aest::colors::ColorBase< Derived > |
| Base class for color representations. More... | |
| struct | aest::colors::ColorArithmetic< Derived > |
| Mixin adding channel-wise arithmetic operators to a color type. More... | |
| class | aest::colors::XYZ |
| A color in the CIE 1931 XYZ color space, relative to the D65 white point. More... | |
| class | aest::colors::Premultiplied< Space > |
| A color of a linear space with premultiplied alpha: each color channel is already multiplied by alpha. More... | |
| class | aest::colors::CIELab |
| A color in CIELab, the CIE 1976 L*a*b* space, relative to D50. More... | |
| class | aest::colors::CIELCH |
| A color in CIELCH: CIELab in polar form, as lightness, chroma and hue. More... | |
| struct | aest::colors::gamut::SRGB |
| The sRGB and Rec. 709 primaries, D65 white, from IEC 61966-2-1. More... | |
| struct | aest::colors::gamut::DisplayP3 |
| The DCI-P3 primaries with D65 white, from SMPTE EG 432-1. More... | |
| struct | aest::colors::gamut::Rec2020 |
| The Rec. 2020 / Rec. 2100 primaries, D65 white, from ITU-R BT.2020. More... | |
| struct | aest::colors::gamut::AP1 |
| The ACES AP1 primaries with the ACES white point (about D60), from SMPTE ST 2065-1, the gamut of ACEScg. More... | |
| struct | aest::colors::RGBName< Gamut, Transfer > |
| Name of the BasicRGB space of a gamut and a transfer function, printed by std::format. More... | |
| class | aest::colors::BasicRGB< Gamut, Transfer > |
A color in an RGB color space: the primaries and white point of Gamut, with channels encoded by Transfer. More... | |
| struct | aest::colors::Euclidean< Space > |
| Measures the Euclidean distance between two colors of a color space. More... | |
Enumerations | |
| enum class | aest::colors::HueMode : std::uint8_t { shorter , longer , increasing , decreasing } |
| How mix() goes around the hue circle between two hues, as in CSS Color 4. More... | |
| enum class | aest::colors::CIE94Application : std::uint8_t { graphic_arts , textiles } |
| The application whose weights de_94() uses, as CIE 116-1995 defines them. More... | |
Typedefs | |
| using | aest::colors::HSL = BasicHSL<SRGB> |
| HSL over sRGB, the HSL of CSS. | |
| using | aest::colors::HSV = BasicHSV<SRGB> |
| HSV over sRGB. | |
| using | aest::colors::Chromaticity = std::array<double, 2> |
| CIE 1931 xy chromaticity coordinates of a primary or white point. | |
| using | aest::colors::SRGB = BasicRGB<gamut::SRGB, tf::SRGB> |
| sRGB with gamma-encoded channels: the encoding of hex codes, 8-bit channels and CSS colors. | |
| using | aest::colors::LinSRGB = BasicRGB<gamut::SRGB, tf::Linear> |
| Linear sRGB: the sRGB primaries without the gamma encoding, so channels are proportional to light and can exceed 1 for HDR values. | |
| using | aest::colors::DisplayP3 = BasicRGB<gamut::DisplayP3, tf::SRGB> |
| Display P3: the P3 primaries with the sRGB transfer function, as on Apple displays and in CSS. | |
| using | aest::colors::LinDisplayP3 = BasicRGB<gamut::DisplayP3, tf::Linear> |
| Linear Display P3. | |
| using | aest::colors::Rec709 = BasicRGB<gamut::SRGB, tf::Rec709> |
| Rec. 709: the sRGB primaries with the Rec. 709 OETF, the encoding of HD video. | |
| using | aest::colors::Rec2020 = BasicRGB<gamut::Rec2020, tf::Rec709> |
| Rec. 2020: the Rec. 2020 primaries with the Rec. 709 OETF, the encoding of SDR UHD video. | |
| using | aest::colors::LinRec2020 = BasicRGB<gamut::Rec2020, tf::Linear> |
| Linear Rec. 2020, the gamut of UHD and HDR video. | |
| using | aest::colors::ACEScg = BasicRGB<gamut::AP1, tf::Linear> |
| ACEScg: linear AP1, the working space of ACES rendering and compositing. | |
| using | aest::colors::Rec2100PQ = BasicRGB<gamut::Rec2020, tf::PQ> |
| Rec.2100 PQ: Rec. 2020 primaries with the PQ signal of HDR10, linear 1.0 at 203 cd/m² | |
| using | aest::colors::Rec2100HLG = BasicRGB<gamut::Rec2020, tf::HLG> |
| Rec.2100 HLG: Rec. 2020 primaries with the HLG signal, linear 1.0 at 75%. | |
Functions | |
| constexpr std::uint16_t | aest::colors::to_half (const float value) |
| Converts a float to an IEEE 754 half, rounding to nearest even. | |
| constexpr float | aest::colors::from_half (const std::uint16_t half) |
| Converts an IEEE 754 half to a float, exactly. | |
| template<PackableRGB Color> | |
| constexpr std::array< std::uint8_t, 4 > | aest::colors::pack_rgba8 (const Color &color) |
| Packs a color into RGBA8 unorm bytes, in memory order, as R8G8B8A8_UNORM and R8G8B8A8_SRGB store them. | |
| template<PackableRGB Color> | |
| constexpr Color | aest::colors::unpack_rgba8 (const std::array< std::uint8_t, 4 > &bytes) |
| Unpacks RGBA8 unorm bytes, in memory order, into a color. | |
| template<PackableRGB Color> | |
| constexpr std::uint32_t | aest::colors::pack_rgb10a2 (const Color &color) |
| Packs a color into A2B10G10R10_UNORM_PACK32: red in bits 0-9, green in 10-19, blue in 20-29 and alpha in 30-31. | |
| template<PackableRGB Color> | |
| constexpr Color | aest::colors::unpack_rgb10a2 (const std::uint32_t bits) |
| Unpacks an A2B10G10R10_UNORM_PACK32 word into a color. | |
| template<PackableLinearRGB Color> | |
| constexpr std::array< std::uint16_t, 4 > | aest::colors::pack_rgba16f (const Color &color) |
| Packs a linear color into RGBA16F halves, in memory order, as R16G16B16A16_SFLOAT stores them. | |
| template<PackableLinearRGB Color> | |
| constexpr Color | aest::colors::unpack_rgba16f (const std::array< std::uint16_t, 4 > &halves) |
| Unpacks RGBA16F halves, in memory order, into a linear color. | |
| template<PackableLinearRGB Color> | |
| constexpr std::uint32_t | aest::colors::pack_r11g11b10f (const Color &color) |
| Packs a linear color into B10G11R11_UFLOAT_PACK32: red in bits 0-10 and green in 11-21 as 11-bit floats, blue in 22-31 as a 10-bit float, alpha dropped. | |
| template<PackableLinearRGB Color> | |
| constexpr Color | aest::colors::unpack_r11g11b10f (const std::uint32_t bits) |
| Unpacks a B10G11R11_UFLOAT_PACK32 word into a linear color. | |
| template<PackableLinearRGB Color> | |
| constexpr std::uint32_t | aest::colors::pack_rgb9e5 (const Color &color) |
| Packs a linear color into E5B9G9R9_UFLOAT_PACK32: 9-bit mantissas of red, green and blue in bits 0-8, 9-17 and 18-26, sharing the 5-bit exponent in bits 27-31; alpha dropped. | |
| template<PackableLinearRGB Color> | |
| constexpr Color | aest::colors::unpack_rgb9e5 (const std::uint32_t bits) |
| Unpacks an E5B9G9R9_UFLOAT_PACK32 word into a linear color. | |
| template<LightnessSpace Space = OKLCH, ColorType Color> requires ConvertibleTo<Space, Color> && ConvertibleTo<Color, Space> | |
| constexpr Color | aest::colors::lighten (const Color &color, const float amount, In< Space > space={}) |
| Moves the lightness of a color a fraction of the way toward white. | |
| template<LightnessSpace Space = OKLCH, ColorType Color> requires ConvertibleTo<Space, Color> && ConvertibleTo<Color, Space> | |
| constexpr Color | aest::colors::darken (const Color &color, const float amount, In< Space > space={}) |
| Moves the lightness of a color a fraction of the way toward black. | |
| template<typename Space = void, ColorType Color> requires InterpolationSpace<WorkingSpace<Space, Color>> && ConvertibleTo<WorkingSpace<Space, Color>, Color> && ConvertibleTo <Color, WorkingSpace<Space, Color>> | |
| constexpr Color | aest::colors::mix (const Color &from, const Color &to, const float amount, In< Space > space={}) |
| Blends two colors. | |
| template<typename Space = void, ColorType From, ColorType To> requires (!std::same_as<From, To>) | |
| From | aest::colors::mix (const From &from, const To &to, float amount, In< Space > space={})=delete |
| Rejects blending colors of two different types. | |
| template<typename Space = void, ColorType Color> requires HueInterpolationSpace<WorkingSpace<Space, Color>> && ConvertibleTo<WorkingSpace<Space, Color>, Color> && ConvertibleTo <Color, WorkingSpace<Space, Color>> | |
| constexpr Color | aest::colors::mix (const Color &from, const Color &to, const float amount, const HueMode mode, In< Space > space={}) |
Blends two colors in a space with a hue, going around the hue circle the way mode picks. | |
| template<typename Space = void, ColorType From, ColorType To> requires (!std::same_as<From, To>) | |
| From | aest::colors::mix (const From &from, const To &to, float amount, HueMode mode, In< Space > space={})=delete |
| Rejects blending colors of two different types along a hue arc. | |
| template<ColorType Color> requires ConvertibleTo<XYZ, Color> | |
| constexpr float | aest::colors::luminance (const Color &color) |
| Relative luminance of a color: the light it emits, weighted by how bright each primary looks. | |
| template<ColorType Color1, ColorType Color2> requires ConvertibleTo<SRGB, Color1> && ConvertibleTo<SRGB, Color2> | |
| float | aest::colors::contrast_ratio (const Color1 &color1, const Color2 &color2) |
| WCAG 2.x contrast ratio between two colors, such as text and its background. | |
| template<SaturationSpace Space = OKLCH, ColorType Color> requires ConvertibleTo<Space, Color> && ConvertibleTo<Color, Space> | |
| constexpr Color | aest::colors::saturate (const Color &color, const float amount, In< Space > space={}) |
| Raises the saturation of a color. | |
| template<SaturationSpace Space = OKLCH, ColorType Color> requires ConvertibleTo<Space, Color> && ConvertibleTo<Color, Space> | |
| constexpr Color | aest::colors::desaturate (const Color &color, const float amount, In< Space > space={}) |
| Moves the saturation of a color a fraction of the way toward gray. | |
| template<SaturationSpace Space = OKLCH, ColorType Color> requires ConvertibleTo<Space, Color> && ConvertibleTo<Color, Space> | |
| constexpr Color | aest::colors::grayscale (const Color &color, In< Space > space={}) |
| Turns a color gray, keeping its lightness and alpha. | |
| template<HueSpace Space = OKLCH, ColorType Color> requires ConvertibleTo<Space, Color> && ConvertibleTo<Color, Space> | |
| constexpr Color | aest::colors::rotate_hue (const Color &color, const float degrees, In< Space > space={}) |
| Turns the hue of a color around the hue circle. | |
| template<HueSpace Space = OKLCH, ColorType Color> requires ConvertibleTo<Space, Color> && ConvertibleTo<Color, Space> | |
| constexpr Color | aest::colors::complement (const Color &color, In< Space > space={}) |
| The complementary color: the hue turned by 180 degrees. | |
| template<BoundedRGBSpace Color> | |
| constexpr Color | aest::colors::invert (const Color &color) |
| Inverts each channel of an encoded RGB color, 1 - c, like CSS invert(); alpha is kept. | |
| template<ColorType Color = SRGB> requires ConvertibleTo<Color, SRGB> | |
| constexpr Color | aest::colors::from_rgba (const std::uint8_t r, const std::uint8_t g, const std::uint8_t b, const std::uint8_t a=BYTE_MAX) |
| Build a color from 8-bit SRGB channels. | |
| template<ColorType Color = SRGB> requires ConvertibleTo<Color, SRGB> | |
| constexpr Color | aest::colors::from_rgba (const std::uint32_t rgba) |
Build a color from a 32-bit SRGB integer in 0xRRGGBBAA format. | |
| template<ColorType Color = SRGB> requires ConvertibleTo<Color, SRGB> | |
| constexpr Color | aest::colors::from_argb (const std::uint32_t argb) |
Build a color from a 32-bit SRGB integer in 0xAARRGGBB format. | |
| template<ColorType Color = SRGB> requires ConvertibleTo<Color, SRGB> | |
| constexpr Color | aest::colors::from_hex (const std::uint32_t hex) |
Build a color from an SRGB hex code, a 32-bit integer in 0xRRGGBB format, as in from_hex(0xFF7F50). | |
| template<ColorType Color> requires ConvertibleTo<SRGB, Color> | |
| constexpr std::uint32_t | aest::colors::to_rgba (const Color &color) |
Convert a color to SRGB and pack it into a 32-bit integer in 0xRRGGBBAA format. | |
| template<ColorType Color> requires ConvertibleTo<SRGB, Color> | |
| constexpr std::uint32_t | aest::colors::to_argb (const Color &color) |
Convert a color to SRGB and pack it into a 32-bit integer in 0xAARRGGBB format. | |
| template<ColorType Color> requires ConvertibleTo<SRGB, Color> | |
| std::string | aest::colors::hex_string (const Color &color) |
| Convert a color to SRGB and write it as a hex code in #RRGGBB format, without alpha. | |
| template<BoundedRGBSpace Space = SRGB, RandomBitGenerator Generator> | |
| constexpr Space | aest::colors::random_color (Generator &generator) |
| A random opaque color, uniform over the channels of an encoded RGB space. | |
| template<HueSpace Space = OKLCH, ColorType Color, RandomBitGenerator Generator> requires ConvertibleTo<Space, Color> && ConvertibleTo<Color, Space> | |
| constexpr Color | aest::colors::random_hue (const Color &color, Generator &generator, In< Space > space={}) |
| A copy of a color with a random hue, keeping the rest. | |
| 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. | |
| template<typename Space = void, ColorType Foreground, ColorType Background> requires LinearSpace<WorkingSpace<Space, Background>> && ConvertibleTo<Premultiplied<WorkingSpace<Space, Background>>, Foreground> && ConvertibleTo<Premultiplied<WorkingSpace<Space, Background>>, Background> && ConvertibleTo<Background, Premultiplied <WorkingSpace<Space, Background>>> | |
| constexpr Background | aest::colors::over (const Foreground &foreground, const Background &background, In< Space > space={}) |
| Composites a color over another: Porter-Duff source-over. | |
| template<LinearRGBSpace Color> | |
| constexpr Color | aest::colors::tonemap::reinhard (const Color &color) |
| Reinhard tonemapping, c / (1 + c) on each channel. | |
| template<LinearRGBSpace Color> | |
| constexpr Color | aest::colors::tonemap::reinhard_extended (const Color &color, const float white) |
Extended Reinhard tonemapping, c (1 + c / w²) / (1 + c) on each channel, which maps white to 1. | |
| template<LinearRGBSpace Color> | |
| constexpr Color | aest::colors::tonemap::aces_fitted (const Color &color) |
| Fitted ACES tonemapping by Stephen Hill: an approximation of the ACES Reference Rendering Transform and sRGB Output Device Transform. | |
| template<EuclideanSpace Space = OKLab, ColorType Color1, ColorType Color2> requires ConvertibleTo<Space, Color1> && ConvertibleTo<Space, Color2> | |
| float | aest::colors::euclidean (const Color1 &color1, const Color2 &color2, In< Space > space={}) |
| Euclidean distance between two colors. | |
| template<ColorType Color1, ColorType Color2> requires ConvertibleTo<CIELab, Color1> && ConvertibleTo<CIELab, Color2> | |
| float | aest::colors::de_76 (const Color1 &color1, const Color2 &color2) |
| The CIE 1976 color difference ΔE*ab: the Euclidean distance in CIELab. | |
| template<ColorType Color1, ColorType Color2> requires ConvertibleTo<CIELab, Color1> && ConvertibleTo<CIELab, Color2> | |
| float | aest::colors::de_94 (const Color1 &reference, const Color2 &sample, const CIE94Application application=CIE94Application::graphic_arts) |
| The CIE 1994 color difference ΔE*94. | |
| template<ColorType Color1, ColorType Color2> requires ConvertibleTo<CIELab, Color1> && ConvertibleTo<CIELab, Color2> | |
| float | aest::colors::de_2000 (const Color1 &color1, const Color2 &color2) |
| The CIEDE2000 color difference ΔE00, the current CIE formula. | |
Variables | |
| template<ColorType Space> | |
| constexpr In< Space > | aest::colors::in {} |
| Selects the color space an operation works in, e.g. lighten(color, 0.2f, in<HSL>). | |
| constexpr float | aest::colors::REFERENCE_WHITE_NITS = 203.f |
| Luminance of linear 1.0 in cd/m²: the HDR reference white of ITU-R BT.2408, and the scale of every linear space. | |
| constexpr Chromaticity | aest::colors::D65 = {0.3127, 0.3290} |
| Chromaticity of the D65 white point, as sRGB defines it: the white of XYZ. | |
| constexpr Chromaticity | aest::colors::D50 = {0.3457, 0.3585} |
| Chromaticity of the D50 white point, as CSS Color 4 and the ICC profile connection space define it: the white of CIELab. | |
Pink colors | |
| constexpr SRGB | aest::colors::css::mediumVioletRed = from_hex(0xC71585) |
| CSS mediumvioletred, #C71585. | |
| constexpr SRGB | aest::colors::css::deepPink = from_hex(0xFF1493) |
| CSS deeppink, #FF1493. | |
| constexpr SRGB | aest::colors::css::paleVioletRed = from_hex(0xDB7093) |
| CSS palevioletred, #DB7093. | |
| constexpr SRGB | aest::colors::css::hotPink = from_hex(0xFF69B4) |
| CSS hotpink, #FF69B4. | |
| constexpr SRGB | aest::colors::css::lightPink = from_hex(0xFFB6C1) |
| CSS lightpink, #FFB6C1. | |
| constexpr SRGB | aest::colors::css::pink = from_hex(0xFFC0CB) |
| CSS pink, #FFC0CB. | |
Red colors | |
| constexpr SRGB | aest::colors::css::darkRed = from_hex(0x8B0000) |
| CSS darkred, #8B0000. | |
| constexpr SRGB | aest::colors::css::red = from_hex(0xFF0000) |
| CSS red, #FF0000. | |
| constexpr SRGB | aest::colors::css::fireBrick = from_hex(0xB22222) |
| CSS firebrick, #B22222. | |
| constexpr SRGB | aest::colors::css::crimson = from_hex(0xDC143C) |
| CSS crimson, #DC143C. | |
| constexpr SRGB | aest::colors::css::indianRed = from_hex(0xCD5C5C) |
| CSS indianred, #CD5C5C. | |
| constexpr SRGB | aest::colors::css::lightCoral = from_hex(0xF08080) |
| CSS lightcoral, #F08080. | |
| constexpr SRGB | aest::colors::css::salmon = from_hex(0xFA8072) |
| CSS salmon, #FA8072. | |
| constexpr SRGB | aest::colors::css::darkSalmon = from_hex(0xE9967A) |
| CSS darksalmon, #E9967A. | |
| constexpr SRGB | aest::colors::css::lightSalmon = from_hex(0xFFA07A) |
| CSS lightsalmon, #FFA07A. | |
Orange colors | |
| constexpr SRGB | aest::colors::css::orangeRed = from_hex(0xFF4500) |
| CSS orangered, #FF4500. | |
| constexpr SRGB | aest::colors::css::tomato = from_hex(0xFF6347) |
| CSS tomato, #FF6347. | |
| constexpr SRGB | aest::colors::css::darkOrange = from_hex(0xFF8C00) |
| CSS darkorange, #FF8C00. | |
| constexpr SRGB | aest::colors::css::coral = from_hex(0xFF7F50) |
| CSS coral, #FF7F50. | |
| constexpr SRGB | aest::colors::css::orange = from_hex(0xFFA500) |
| CSS orange, #FFA500. | |
Yellow colors | |
| constexpr SRGB | aest::colors::css::darkKhaki = from_hex(0xBDB76B) |
| CSS darkkhaki, #BDB76B. | |
| constexpr SRGB | aest::colors::css::gold = from_hex(0xFFD700) |
| CSS gold, #FFD700. | |
| constexpr SRGB | aest::colors::css::khaki = from_hex(0xF0E68C) |
| CSS khaki, #F0E68C. | |
| constexpr SRGB | aest::colors::css::peachPuff = from_hex(0xFFDAB9) |
| CSS peachpuff, #FFDAB9. | |
| constexpr SRGB | aest::colors::css::yellow = from_hex(0xFFFF00) |
| CSS yellow, #FFFF00. | |
| constexpr SRGB | aest::colors::css::paleGoldenrod = from_hex(0xEEE8AA) |
| CSS palegoldenrod, #EEE8AA. | |
| constexpr SRGB | aest::colors::css::moccasin = from_hex(0xFFE4B5) |
| CSS moccasin, #FFE4B5. | |
| constexpr SRGB | aest::colors::css::papayaWhip = from_hex(0xFFEFD5) |
| CSS papayawhip, #FFEFD5. | |
| constexpr SRGB | aest::colors::css::lightGoldenrodYellow |
| CSS lightgoldenrodyellow, #FAFAD2. | |
| constexpr SRGB | aest::colors::css::lemonChiffon = from_hex(0xFFFACD) |
| CSS lemonchiffon, #FFFACD. | |
| constexpr SRGB | aest::colors::css::lightYellow = from_hex(0xFFFFE0) |
| CSS lightyellow, #FFFFE0. | |
Brown colors | |
| constexpr SRGB | aest::colors::css::maroon = from_hex(0x800000) |
| CSS maroon, #800000. | |
| constexpr SRGB | aest::colors::css::brown = from_hex(0xA52A2A) |
| CSS brown, #A52A2A. | |
| constexpr SRGB | aest::colors::css::saddleBrown = from_hex(0x8B4513) |
| CSS saddlebrown, #8B4513. | |
| constexpr SRGB | aest::colors::css::sienna = from_hex(0xA0522D) |
| CSS sienna, #A0522D. | |
| constexpr SRGB | aest::colors::css::chocolate = from_hex(0xD2691E) |
| CSS chocolate, #D2691E. | |
| constexpr SRGB | aest::colors::css::darkGoldenrod = from_hex(0xB8860B) |
| CSS darkgoldenrod, #B8860B. | |
| constexpr SRGB | aest::colors::css::peru = from_hex(0xCD853F) |
| CSS peru, #CD853F. | |
| constexpr SRGB | aest::colors::css::rosyBrown = from_hex(0xBC8F8F) |
| CSS rosybrown, #BC8F8F. | |
| constexpr SRGB | aest::colors::css::goldenrod = from_hex(0xDAA520) |
| CSS goldenrod, #DAA520. | |
| constexpr SRGB | aest::colors::css::sandyBrown = from_hex(0xF4A460) |
| CSS sandybrown, #F4A460. | |
| constexpr SRGB | aest::colors::css::tan = from_hex(0xD2B48C) |
| CSS tan, #D2B48C. | |
| constexpr SRGB | aest::colors::css::burlywood = from_hex(0xDEB887) |
| CSS burlywood, #DEB887. | |
| constexpr SRGB | aest::colors::css::wheat = from_hex(0xF5DEB3) |
| CSS wheat, #F5DEB3. | |
| constexpr SRGB | aest::colors::css::navajoWhite = from_hex(0xFFDEAD) |
| CSS navajowhite, #FFDEAD. | |
| constexpr SRGB | aest::colors::css::bisque = from_hex(0xFFE4C4) |
| CSS bisque, #FFE4C4. | |
| constexpr SRGB | aest::colors::css::blanchedAlmond = from_hex(0xFFEBCD) |
| CSS blanchedalmond, #FFEBCD. | |
| constexpr SRGB | aest::colors::css::cornsilk = from_hex(0xFFF8DC) |
| CSS cornsilk, #FFF8DC. | |
Purple / Violet tones | |
| constexpr SRGB | aest::colors::css::indigo = from_hex(0x4B0082) |
| CSS indigo, #4B0082. | |
| constexpr SRGB | aest::colors::css::purple = from_hex(0x800080) |
| CSS purple, #800080. | |
| constexpr SRGB | aest::colors::css::darkMagenta = from_hex(0x8B008B) |
| CSS darkmagenta, #8B008B. | |
| constexpr SRGB | aest::colors::css::darkViolet = from_hex(0x9400D3) |
| CSS darkviolet, #9400D3. | |
| constexpr SRGB | aest::colors::css::darkSlateBlue = from_hex(0x483D8B) |
| CSS darkslateblue, #483D8B. | |
| constexpr SRGB | aest::colors::css::blueViolet = from_hex(0x8A2BE2) |
| CSS blueviolet, #8A2BE2. | |
| constexpr SRGB | aest::colors::css::darkOrchid = from_hex(0x9932CC) |
| CSS darkorchid, #9932CC. | |
| constexpr SRGB | aest::colors::css::fuchsia = from_hex(0xFF00FF) |
| CSS fuchsia, #FF00FF. | |
| constexpr SRGB | aest::colors::css::magenta = from_hex(0xFF00FF) |
| CSS magenta, #FF00FF. | |
| constexpr SRGB | aest::colors::css::slateBlue = from_hex(0x6A5ACD) |
| CSS slateblue, #6A5ACD. | |
| constexpr SRGB | aest::colors::css::mediumSlateBlue = from_hex(0x7B68EE) |
| CSS mediumslateblue, #7B68EE. | |
| constexpr SRGB | aest::colors::css::mediumOrchid = from_hex(0xBA55D3) |
| CSS mediumorchid, #BA55D3. | |
| constexpr SRGB | aest::colors::css::mediumPurple = from_hex(0x9370DB) |
| CSS mediumpurple, #9370DB. | |
| constexpr SRGB | aest::colors::css::orchid = from_hex(0xDA70D6) |
| CSS orchid, #DA70D6. | |
| constexpr SRGB | aest::colors::css::violet = from_hex(0xEE82EE) |
| CSS violet, #EE82EE. | |
| constexpr SRGB | aest::colors::css::plum = from_hex(0xDDA0DD) |
| CSS plum, #DDA0DD. | |
| constexpr SRGB | aest::colors::css::thistle = from_hex(0xD8BFD8) |
| CSS thistle, #D8BFD8. | |
| constexpr SRGB | aest::colors::css::lavender = from_hex(0xE6E6FA) |
| CSS lavender, #E6E6FA. | |
Blue tones | |
| constexpr SRGB | aest::colors::css::midnightBlue = from_hex(0x191970) |
| CSS midnightblue, #191970. | |
| constexpr SRGB | aest::colors::css::navy = from_hex(0x000080) |
| CSS navy, #000080. | |
| constexpr SRGB | aest::colors::css::darkBlue = from_hex(0x00008B) |
| CSS darkblue, #00008B. | |
| constexpr SRGB | aest::colors::css::mediumBlue = from_hex(0x0000CD) |
| CSS mediumblue, #0000CD. | |
| constexpr SRGB | aest::colors::css::blue = from_hex(0x0000FF) |
| CSS blue, #0000FF. | |
| constexpr SRGB | aest::colors::css::royalBlue = from_hex(0x4169E1) |
| CSS royalblue, #4169E1. | |
| constexpr SRGB | aest::colors::css::steelBlue = from_hex(0x4682B4) |
| CSS steelblue, #4682B4. | |
| constexpr SRGB | aest::colors::css::dodgerBlue = from_hex(0x1E90FF) |
| CSS dodgerblue, #1E90FF. | |
| constexpr SRGB | aest::colors::css::deepSkyBlue = from_hex(0x00BFFF) |
| CSS deepskyblue, #00BFFF. | |
| constexpr SRGB | aest::colors::css::cornflowerBlue = from_hex(0x6495ED) |
| CSS cornflowerblue, #6495ED. | |
| constexpr SRGB | aest::colors::css::skyBlue = from_hex(0x87CEEB) |
| CSS skyblue, #87CEEB. | |
| constexpr SRGB | aest::colors::css::lightSkyBlue = from_hex(0x87CEFA) |
| CSS lightskyblue, #87CEFA. | |
| constexpr SRGB | aest::colors::css::lightSteelBlue = from_hex(0xB0C4DE) |
| CSS lightsteelblue, #B0C4DE. | |
| constexpr SRGB | aest::colors::css::lightBlue = from_hex(0xADD8E6) |
| CSS lightblue, #ADD8E6. | |
| constexpr SRGB | aest::colors::css::powderBlue = from_hex(0xB0E0E6) |
| CSS powderblue, #B0E0E6. | |
Cyan tones | |
| constexpr SRGB | aest::colors::css::teal = from_hex(0x008080) |
| CSS teal, #008080. | |
| constexpr SRGB | aest::colors::css::darkCyan = from_hex(0x008B8B) |
| CSS darkcyan, #008B8B. | |
| constexpr SRGB | aest::colors::css::lightSeaGreen = from_hex(0x20B2AA) |
| CSS lightseagreen, #20B2AA. | |
| constexpr SRGB | aest::colors::css::cadetBlue = from_hex(0x5F9EA0) |
| CSS cadetblue, #5F9EA0. | |
| constexpr SRGB | aest::colors::css::darkTurquoise = from_hex(0x00CED1) |
| CSS darkturquoise, #00CED1. | |
| constexpr SRGB | aest::colors::css::mediumTurquoise = from_hex(0x48D1CC) |
| CSS mediumturquoise, #48D1CC. | |
| constexpr SRGB | aest::colors::css::turquoise = from_hex(0x40E0D0) |
| CSS turquoise, #40E0D0. | |
| constexpr SRGB | aest::colors::css::aqua = from_hex(0x00FFFF) |
| CSS aqua, #00FFFF. | |
| constexpr SRGB | aest::colors::css::cyan = from_hex(0x00FFFF) |
| CSS cyan, #00FFFF. | |
| constexpr SRGB | aest::colors::css::aquamarine = from_hex(0x7FFFD4) |
| CSS aquamarine, #7FFFD4. | |
| constexpr SRGB | aest::colors::css::paleTurquoise = from_hex(0xAFEEEE) |
| CSS paleturquoise, #AFEEEE. | |
| constexpr SRGB | aest::colors::css::lightCyan = from_hex(0xE0FFFF) |
| CSS lightcyan, #E0FFFF. | |
Green tones | |
| constexpr SRGB | aest::colors::css::darkGreen = from_hex(0x006400) |
| CSS darkgreen, #006400. | |
| constexpr SRGB | aest::colors::css::green = from_hex(0x008000) |
| CSS green, #008000. | |
| constexpr SRGB | aest::colors::css::darkOliveGreen = from_hex(0x556B2F) |
| CSS darkolivegreen, #556B2F. | |
| constexpr SRGB | aest::colors::css::forestGreen = from_hex(0x228B22) |
| CSS forestgreen, #228B22. | |
| constexpr SRGB | aest::colors::css::seaGreen = from_hex(0x2E8B57) |
| CSS seagreen, #2E8B57. | |
| constexpr SRGB | aest::colors::css::olive = from_hex(0x808000) |
| CSS olive, #808000. | |
| constexpr SRGB | aest::colors::css::oliveDrab = from_hex(0x6B8E23) |
| CSS olivedrab, #6B8E23. | |
| constexpr SRGB | aest::colors::css::mediumSeaGreen = from_hex(0x3CB371) |
| CSS mediumseagreen, #3CB371. | |
| constexpr SRGB | aest::colors::css::limeGreen = from_hex(0x32CD32) |
| CSS limegreen, #32CD32. | |
| constexpr SRGB | aest::colors::css::lime = from_hex(0x00FF00) |
| CSS lime, #00FF00. | |
| constexpr SRGB | aest::colors::css::springGreen = from_hex(0x00FF7F) |
| CSS springgreen, #00FF7F. | |
| constexpr SRGB | aest::colors::css::mediumSpringGreen = from_hex(0x00FA9A) |
| CSS mediumspringgreen, #00FA9A. | |
| constexpr SRGB | aest::colors::css::darkSeaGreen = from_hex(0x8FBC8F) |
| CSS darkseagreen, #8FBC8F. | |
| constexpr SRGB | aest::colors::css::mediumAquamarine = from_hex(0x66CDAA) |
| CSS mediumaquamarine, #66CDAA. | |
| constexpr SRGB | aest::colors::css::yellowGreen = from_hex(0x9ACD32) |
| CSS yellowgreen, #9ACD32. | |
| constexpr SRGB | aest::colors::css::lawnGreen = from_hex(0x7CFC00) |
| CSS lawngreen, #7CFC00. | |
| constexpr SRGB | aest::colors::css::chartreuse = from_hex(0x7FFF00) |
| CSS chartreuse, #7FFF00. | |
| constexpr SRGB | aest::colors::css::lightGreen = from_hex(0x90EE90) |
| CSS lightgreen, #90EE90. | |
| constexpr SRGB | aest::colors::css::greenYellow = from_hex(0xADFF2F) |
| CSS greenyellow, #ADFF2F. | |
| constexpr SRGB | aest::colors::css::paleGreen = from_hex(0x98FB98) |
| CSS palegreen, #98FB98. | |
White colors | |
| constexpr SRGB | aest::colors::css::mistyRose = from_hex(0xFFE4E1) |
| CSS mistyrose, #FFE4E1. | |
| constexpr SRGB | aest::colors::css::antiqueWhite = from_hex(0xFAEBD7) |
| CSS antiquewhite, #FAEBD7. | |
| constexpr SRGB | aest::colors::css::linen = from_hex(0xFAF0E6) |
| CSS linen, #FAF0E6. | |
| constexpr SRGB | aest::colors::css::beige = from_hex(0xF5F5DC) |
| CSS beige, #F5F5DC. | |
| constexpr SRGB | aest::colors::css::whiteSmoke = from_hex(0xF5F5F5) |
| CSS whitesmoke, #F5F5F5. | |
| constexpr SRGB | aest::colors::css::lavenderBlush = from_hex(0xFFF0F5) |
| CSS lavenderblush, #FFF0F5. | |
| constexpr SRGB | aest::colors::css::oldLace = from_hex(0xFDF5E6) |
| CSS oldlace, #FDF5E6. | |
| constexpr SRGB | aest::colors::css::aliceBlue = from_hex(0xF0F8FF) |
| CSS aliceblue, #F0F8FF. | |
| constexpr SRGB | aest::colors::css::seashell = from_hex(0xFFF5EE) |
| CSS seashell, #FFF5EE. | |
| constexpr SRGB | aest::colors::css::ghostWhite = from_hex(0xF8F8FF) |
| CSS ghostwhite, #F8F8FF. | |
| constexpr SRGB | aest::colors::css::honeydew = from_hex(0xF0FFF0) |
| CSS honeydew, #F0FFF0. | |
| constexpr SRGB | aest::colors::css::floralWhite = from_hex(0xFFFAF0) |
| CSS floralwhite, #FFFAF0. | |
| constexpr SRGB | aest::colors::css::azure = from_hex(0xF0FFFF) |
| CSS azure, #F0FFFF. | |
| constexpr SRGB | aest::colors::css::mintCream = from_hex(0xF5FFFA) |
| CSS mintcream, #F5FFFA. | |
| constexpr SRGB | aest::colors::css::snow = from_hex(0xFFFAFA) |
| CSS snow, #FFFAFA. | |
| constexpr SRGB | aest::colors::css::ivory = from_hex(0xFFFFF0) |
| CSS ivory, #FFFFF0. | |
| constexpr SRGB | aest::colors::css::white = from_hex(0xFFFFFF) |
| CSS white, #FFFFFF. | |
Gray and black colors | |
| constexpr SRGB | aest::colors::css::black = from_hex(0x000000) |
| CSS black, #000000. | |
| constexpr SRGB | aest::colors::css::darkSlateGray = from_hex(0x2F4F4F) |
| CSS darkslategray, #2F4F4F. | |
| constexpr SRGB | aest::colors::css::dimGray = from_hex(0x696969) |
| CSS dimgray, #696969. | |
| constexpr SRGB | aest::colors::css::slateGray = from_hex(0x708090) |
| CSS slategray, #708090. | |
| constexpr SRGB | aest::colors::css::gray = from_hex(0x808080) |
| CSS gray, #808080. | |
| constexpr SRGB | aest::colors::css::lightSlateGray = from_hex(0x778899) |
| CSS lightslategray, #778899. | |
| constexpr SRGB | aest::colors::css::darkGray = from_hex(0xA9A9A9) |
| CSS darkgray, #A9A9A9. | |
| constexpr SRGB | aest::colors::css::silver = from_hex(0xC0C0C0) |
| CSS silver, #C0C0C0. | |
| constexpr SRGB | aest::colors::css::lightGray = from_hex(0xD3D3D3) |
| CSS lightgray, #D3D3D3. | |
| constexpr SRGB | aest::colors::css::gainsboro = from_hex(0xDCDCDC) |
| CSS gainsboro, #DCDCDC. | |
Files | |
| file | colors/src/lib.ixx |
| Primary interface of aest.colors, re-exporting its partitions. | |
| file | colors/src/CieLab.cppm |
| Partition aest.colors:cie_lab: the CIE 1976 L*a*b* space and its polar form, relative to D50 as in CSS Color 4. | |
| file | colors/src/Color.cppm |
| Partition aest.colors:color: color types, their shared base and the ColorType concept. | |
| file | colors/src/Compositing.cppm |
| Partition aest.colors:compositing: premultiplied alpha and Porter-Duff compositing. | |
| file | colors/src/Converter.cppm |
| Partition aest.colors:converter: conversions between color spaces. | |
| file | colors/src/Cylindrical.cppm |
| Partition aest.colors:cylindrical: HSL and HSV, cylindrical views of an encoded RGB space. | |
| file | colors/src/Distance.cppm |
| Partition aest.colors:distance: distance metrics between colors, Euclidean and the CIE color difference formulas. | |
| file | colors/src/Format.cppm |
| Partition aest.colors:format: the std::formatter specialization for every ColorType. | |
| file | colors/src/Gamut.cppm |
| Partition aest.colors:gamut: RGB gamuts, the BasicRGB color spaces built from a gamut and a transfer function, and their matrices to CIE XYZ, derived at compile time from chromaticities. | |
| file | colors/src/Hex.cppm |
| Partition aest.colors:hex: hex codes, 8-bit channels and packed 32-bit colors, read and written as SRGB for any color space. | |
| file | colors/src/NamedColors.cppm |
| Partition aest.colors:named_colors: the CSS named colors as SRGB constants, in the aest::colors::css namespace. | |
| file | colors/src/OkLab.cppm |
| Partition aest.colors:oklab: the perceptual spaces OKLab and OKLCH by Björn Ottosson. | |
| file | colors/src/Operations.cppm |
| Partition aest.colors:operations: free functions that adjust colors. | |
| file | colors/src/Packed.cppm |
| Partition aest.colors:packed: GPU pixel formats, packed and unpacked with the bit layouts of Vulkan and Direct3D. | |
| file | colors/src/Random.cppm |
| Partition aest.colors:random: random colors drawn from a caller-supplied random bit generator. | |
| file | colors/src/Space.cppm |
| Partition aest.colors:space: the tag that selects the color space an operation works in, and the linear space a color follows by default. | |
| file | colors/src/Tonemap.cppm |
| Partition aest.colors:tonemap: operators that compress HDR linear light into the 0-1 range of a display. | |
| file | colors/src/Transfer.cppm |
| Partition aest.colors:transfer: the transfer functions that encode linear light into RGB channel values. | |