|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Floating-point linear RGBA color in the Rec. More...
#include <GREM/core/data/Color.hpp>
Public Types | |
| enum class | TransferFunction : uint8_t { LINEAR , SRGB } |
| Color transfer function. More... | |
Public Member Functions | |
| constexpr | Color () noexcept=default |
| Construct a transparent color with a value of 0 in all components. | |
| constexpr bool | operator== (const Color &other) const noexcept=default |
| Compare this color to another for equality. | |
| constexpr vec3 | toLinearRGB () const noexcept |
| Convert the color to a vector with 3 components, XYZ, that are mapped from the color components RGB, respectively. | |
| constexpr vec4 | toLinearRGBA () const noexcept |
| Convert the color to a vector with 4 components, XYZW, that are mapped from the color components RGBA, respectively. | |
| constexpr u8vec3norm | toSRGB () const noexcept |
| Convert the color to a vector with 3 sRGB-encoded components, XYZ, that are mapped from the color components RGB, respectively. | |
| constexpr vec3 | toFloatSRGB () const noexcept |
| Convert the color to a vector with 3 floating-point sRGB components, XYZ, that are mapped from the color components RGB, respectively. | |
| constexpr u8vec4norm | toSRGBA () const noexcept |
| Convert the color to a vector with 3 sRGB-encoded components, XYZ, and 1 linear component, W, that are mapped from the color components RGBA, respectively. | |
| constexpr vec4 | toFloatSRGBA () const noexcept |
| Convert the color to a vector with 3 floating-point sRGB components, XYZ, and 1 linear component, W, that are mapped from the color components RGBA, respectively. | |
| constexpr float | getAlpha () const noexcept |
| Get the linear alpha component of the color. | |
| constexpr void | setAlpha (float newAlpha) noexcept |
| Set the linear alpha component of the color. | |
| constexpr Color & | operator*= (const Color &other) noexcept |
| Multiply the component values of this color with their respective component values in another color. | |
| constexpr Color & | operator*= (float coefficient) noexcept |
| Multiply the component values of this color by a scalar. | |
| constexpr Color & | operator/= (const Color &other) noexcept |
| Divide the component values of this color by their respective component values in another color. | |
| constexpr Color & | operator/= (float denominator) noexcept |
| Divide the component values of this color by a scalar. | |
| constexpr Color & | operator*= (vec3 rgbCoefficients) noexcept |
| Multiply the RGB component values of this color by the corresponding values in a 3-component vector. | |
| constexpr Color & | operator*= (vec4 rgbaCoefficients) noexcept |
| Multiply the RGBA component values of this color by the corresponding values in a 4-component vector. | |
| constexpr Color & | operator/= (vec3 rgbDenominators) noexcept |
| Divide the RGB component values of this color by the corresponding values in a 3-component vector. | |
| constexpr Color & | operator/= (vec4 rgbaDenominators) noexcept |
| Divide the RGBA component values of this color by the corresponding values in a 4-component vector. | |
Static Public Member Functions | |
| static constexpr float | convertLinearToSRGB (float x) |
| Convert a color component in linear space to the sRGB color space. | |
| static constexpr vec3 | convertLinearToSRGB (vec3 rgb) |
| Convert a color in linear space to the sRGB color space. | |
| static constexpr vec4 | convertLinearToSRGB (vec4 rgba) |
| Convert a color in linear space to the sRGB color space. | |
| static constexpr float | convertSRGBToLinear (float x) |
| Convert a color component in the sRGB color space to linear space. | |
| static constexpr vec3 | convertSRGBToLinear (vec3 rgb) |
| Convert a color in the sRGB color space to linear space. | |
| static constexpr vec4 | convertSRGBToLinear (vec4 rgba) |
| Convert a color in the sRGB color space to linear space. | |
| static constexpr vec4 | convertStraightToPremultipliedAlpha (vec4 rgba) |
| Convert a linear color from straight to pre-multiplied alpha. | |
| static constexpr vec4 | convertPremultipliedToStraightAlpha (vec4 rgba) |
| Convert a linear color from pre-multiplied to straight alpha. | |
| static constexpr Color | fromLinear (float x, float a=1.0f) noexcept |
| Create a grayscale color from a linear scalar. | |
| static constexpr Color | fromLinear (float r, float g, float b, float a=1.0f) noexcept |
| Create a color from linear RGB components. | |
| static constexpr Color | fromLinear (vec3 rgb) noexcept |
| Create a color from a vector of 3 components, XYZ, that map to the linear color components RGB, respectively. | |
| static constexpr Color | fromLinear (vec4 rgba) noexcept |
| Construct a color from a vector of 4 components, XYZW, that map to the linear color components RGBA, respectively. | |
| static constexpr Color | fromLinear (vec3 rgb, float a) noexcept |
| Create a color from a vector of 3 components, XYZ, and a scalar, A, that map to the linear color components RGBA, respectively. | |
| static constexpr Color | fromSRGB (u8norm r, u8norm g, u8norm b, u8norm a=1.0f) noexcept |
| Create a color from sRGB-encoded components. | |
| static constexpr Color | fromSRGB (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) noexcept |
| Create a color from unnormalized sRGB-encoded components. | |
| static constexpr Color | fromSRGB (u8vec3norm rgb, u8norm a=1.0f) noexcept |
| Create a color from a vector of 3 sRGB-encoded components, XYZ, and a scalar, A, that map to the color components RGBA, respectively. | |
| static constexpr Color | fromSRGB (u8vec3 rgb, uint8_t a=255) noexcept |
| Create a color from a vector of 3 unnormalized sRGB-encoded components, XYZ, and a scalar, A, that map to the color components RGBA, respectively. | |
| static constexpr Color | fromSRGB (vec3 rgb, float a=1.0f) noexcept |
| Create a color from a vector of 3 floating-point sRGB components, XYZ, and a scalar, A, that map to the color components RGBA, respectively. | |
| static constexpr Color | fromSRGB (u8vec4norm rgba) noexcept |
| Create a color from a vector of 3 sRGB-encoded components, XYZ, and 1 linear component, W, that map to the color components RGBA, respectively. | |
| static constexpr Color | fromSRGB (u8vec4 rgba) noexcept |
| Create a color from a vector of 3 unnormalized sRGB-encoded components, XYZ, and 1 linear component, W, that map to the color components RGBA, respectively. | |
| static constexpr Color | fromSRGB (vec4 rgba) noexcept |
| Create a color from a vector of 3 floating-point sRGB components, XYZ, and 1 linear component, W, that map to the color components RGBA, respectively. | |
| static constexpr Color | fromAlpha (float a) noexcept |
| Create a color from a linear alpha component. | |
Static Public Attributes | |
| static const Color | INVISIBLE {} |
| static const Color | ALICE_BLUE {vec4{0.87136712f, 0.93868573f, 1.00000000f, 1.0f}} |
| static const Color | ANTIQUE_WHITE {vec4{0.95597335f, 0.83076988f, 0.67954247f, 1.0f}} |
| static const Color | AQUA {vec4{0.00000000f, 1.00000000f, 1.00000000f, 1.0f}} |
| static const Color | AQUAMARINE {vec4{0.21223076f, 1.00000000f, 0.65837482f, 1.0f}} |
| static const Color | AZURE {vec4{0.87136712f, 1.00000000f, 1.00000000f, 1.0f}} |
| static const Color | BEIGE {vec4{0.91309865f, 0.91309865f, 0.71569350f, 1.0f}} |
| static const Color | BISQUE {vec4{1.00000000f, 0.77582222f, 0.55201140f, 1.0f}} |
| static const Color | BLACK {vec4{0.00000000f, 0.00000000f, 0.00000000f, 1.0f}} |
| static const Color | BLANCHED_ALMOND {vec4{1.00000000f, 0.83076988f, 0.61049557f, 1.0f}} |
| static const Color | BLUE {vec4{0.00000000f, 0.00000000f, 1.00000000f, 1.0f}} |
| static const Color | BLUE_VIOLET {vec4{0.25415209f, 0.02415763f, 0.76052450f, 1.0f}} |
| static const Color | BROWN {vec4{0.37626212f, 0.02315337f, 0.02315337f, 1.0f}} |
| static const Color | BURLY_WOOD {vec4{0.73046074f, 0.47932018f, 0.24228112f, 1.0f}} |
| static const Color | CADET_BLUE {vec4{0.11443537f, 0.34191442f, 0.35153260f, 1.0f}} |
| static const Color | CHARTREUSE {vec4{0.21223076f, 1.00000000f, 0.00000000f, 1.0f}} |
| static const Color | CHOCOLATE {vec4{0.64447968f, 0.14126329f, 0.01298303f, 1.0f}} |
| static const Color | CORAL {vec4{1.00000000f, 0.21223076f, 0.08021982f, 1.0f}} |
| static const Color | CORNFLOWER_BLUE {vec4{0.12743768f, 0.30054379f, 0.84687323f, 1.0f}} |
| static const Color | CORNSILK {vec4{1.00000000f, 0.93868573f, 0.71569350f, 1.0f}} |
| static const Color | CRIMSON {vec4{0.71569350f, 0.00699541f, 0.04518620f, 1.0f}} |
| static const Color | CYAN {vec4{0.00000000f, 1.00000000f, 1.00000000f, 1.0f}} |
| static const Color | DARK_BLUE {vec4{0.00000000f, 0.00000000f, 0.25818285f, 1.0f}} |
| static const Color | DARK_CYAN {vec4{0.00000000f, 0.25818285f, 0.25818285f, 1.0f}} |
| static const Color | DARK_GOLDEN_ROD {vec4{0.47932018f, 0.23839757f, 0.00334654f, 1.0f}} |
| static const Color | DARK_GRAY {vec4{0.39675523f, 0.39675523f, 0.39675523f, 1.0f}} |
| static const Color | DARK_GREY {vec4{0.39675523f, 0.39675523f, 0.39675523f, 1.0f}} |
| static const Color | DARK_GREEN {vec4{0.00000000f, 0.12743768f, 0.00000000f, 1.0f}} |
| static const Color | DARK_KHAKI {vec4{0.50888132f, 0.47353150f, 0.14702727f, 1.0f}} |
| static const Color | DARK_MAGENTA {vec4{0.25818285f, 0.00000000f, 0.25818285f, 1.0f}} |
| static const Color | DARK_OLIVE_GREEN {vec4{0.09084171f, 0.14702727f, 0.02842604f, 1.0f}} |
| static const Color | DARK_ORANGE {vec4{1.00000000f, 0.26225066f, 0.00000000f, 1.0f}} |
| static const Color | DARK_ORCHID {vec4{0.31854678f, 0.03189603f, 0.60382734f, 1.0f}} |
| static const Color | DARK_RED {vec4{0.25818285f, 0.00000000f, 0.00000000f, 1.0f}} |
| static const Color | DARK_SALMON {vec4{0.81484657f, 0.30498731f, 0.19461783f, 1.0f}} |
| static const Color | DARK_SEA_GREEN {vec4{0.27467731f, 0.50288646f, 0.27467731f, 1.0f}} |
| static const Color | DARK_SLATE_BLUE {vec4{0.06480327f, 0.04666509f, 0.25818285f, 1.0f}} |
| static const Color | DARK_SLATE_GRAY {vec4{0.02842604f, 0.07818742f, 0.07818742f, 1.0f}} |
| static const Color | DARK_SLATE_GREY {vec4{0.02842604f, 0.07818742f, 0.07818742f, 1.0f}} |
| static const Color | DARK_TURQUOISE {vec4{0.00000000f, 0.61720656f, 0.63759687f, 1.0f}} |
| static const Color | DARK_VIOLET {vec4{0.29613827f, 0.00000000f, 0.65140564f, 1.0f}} |
| static const Color | DEEP_PINK {vec4{1.00000000f, 0.00699541f, 0.29177065f, 1.0f}} |
| static const Color | DEEP_SKY_BLUE {vec4{0.00000000f, 0.52099557f, 1.00000000f, 1.0f}} |
| static const Color | DIM_GRAY {vec4{0.14126329f, 0.14126329f, 0.14126329f, 1.0f}} |
| static const Color | DIM_GREY {vec4{0.14126329f, 0.14126329f, 0.14126329f, 1.0f}} |
| static const Color | DODGER_BLUE {vec4{0.01298303f, 0.27889426f, 1.00000000f, 1.0f}} |
| static const Color | FIRE_BRICK {vec4{0.44520119f, 0.01599629f, 0.01599629f, 1.0f}} |
| static const Color | FLORAL_WHITE {vec4{1.00000000f, 0.95597335f, 0.87136712f, 1.0f}} |
| static const Color | FOREST_GREEN {vec4{0.01599629f, 0.25818285f, 0.01599629f, 1.0f}} |
| static const Color | FUCHSIA {vec4{1.00000000f, 0.00000000f, 1.00000000f, 1.0f}} |
| static const Color | GAINSBORO {vec4{0.71569350f, 0.71569350f, 0.71569350f, 1.0f}} |
| static const Color | GHOST_WHITE {vec4{0.93868573f, 0.93868573f, 1.00000000f, 1.0f}} |
| static const Color | GOLD {vec4{1.00000000f, 0.67954247f, 0.00000000f, 1.0f}} |
| static const Color | GOLDEN_ROD {vec4{0.70110189f, 0.37626212f, 0.01444384f, 1.0f}} |
| static const Color | GRAY {vec4{0.21586050f, 0.21586050f, 0.21586050f, 1.0f}} |
| static const Color | GREY {vec4{0.21586050f, 0.21586050f, 0.21586050f, 1.0f}} |
| static const Color | GREEN {vec4{0.00000000f, 0.21586050f, 0.00000000f, 1.0f}} |
| static const Color | GREEN_YELLOW {vec4{0.41788507f, 1.00000000f, 0.02842604f, 1.0f}} |
| static const Color | HONEY_DEW {vec4{0.87136712f, 1.00000000f, 0.87136712f, 1.0f}} |
| static const Color | HOT_PINK {vec4{1.00000000f, 0.14126329f, 0.45641102f, 1.0f}} |
| static const Color | INDIAN_RED {vec4{0.61049557f, 0.10702310f, 0.10702310f, 1.0f}} |
| static const Color | INDIGO {vec4{0.07036010f, 0.00000000f, 0.22322796f, 1.0f}} |
| static const Color | IVORY {vec4{1.00000000f, 1.00000000f, 0.87136712f, 1.0f}} |
| static const Color | KHAKI {vec4{0.87136712f, 0.79129794f, 0.26225066f, 1.0f}} |
| static const Color | LAVENDER {vec4{0.79129794f, 0.79129794f, 0.95597335f, 1.0f}} |
| static const Color | LAVENDER_BLUSH {vec4{1.00000000f, 0.87136712f, 0.91309865f, 1.0f}} |
| static const Color | LAWN_GREEN {vec4{0.20155625f, 0.97344529f, 0.00000000f, 1.0f}} |
| static const Color | LEMON_CHIFFON {vec4{1.00000000f, 0.95597335f, 0.61049557f, 1.0f}} |
| static const Color | LIGHT_BLUE {vec4{0.41788507f, 0.68668531f, 0.79129794f, 1.0f}} |
| static const Color | LIGHT_CORAL {vec4{0.87136712f, 0.21586050f, 0.21586050f, 1.0f}} |
| static const Color | LIGHT_CYAN {vec4{0.74540421f, 1.00000000f, 1.00000000f, 1.0f}} |
| static const Color | LIGHT_GOLDEN_ROD_YELLOW {vec4{0.95597335f, 0.95597335f, 0.64447968f, 1.0f}} |
| static const Color | LIGHT_GRAY {vec4{0.65140564f, 0.65140564f, 0.65140564f, 1.0f}} |
| static const Color | LIGHT_GREY {vec4{0.65140564f, 0.65140564f, 0.65140564f, 1.0f}} |
| static const Color | LIGHT_GREEN {vec4{0.27889426f, 0.85499261f, 0.27889426f, 1.0f}} |
| static const Color | LIGHT_PINK {vec4{1.00000000f, 0.46778380f, 0.53327640f, 1.0f}} |
| static const Color | LIGHT_SALMON {vec4{1.00000000f, 0.35153260f, 0.19461783f, 1.0f}} |
| static const Color | LIGHT_SEA_GREEN {vec4{0.01444384f, 0.44520119f, 0.40197778f, 1.0f}} |
| static const Color | LIGHT_SKY_BLUE {vec4{0.24228112f, 0.61720656f, 0.95597335f, 1.0f}} |
| static const Color | LIGHT_SLATE_GRAY {vec4{0.18447499f, 0.24620133f, 0.31854678f, 1.0f}} |
| static const Color | LIGHT_SLATE_GREY {vec4{0.18447499f, 0.24620133f, 0.31854678f, 1.0f}} |
| static const Color | LIGHT_STEEL_BLUE {vec4{0.43415364f, 0.55201140f, 0.73046074f, 1.0f}} |
| static const Color | LIGHT_YELLOW {vec4{1.00000000f, 1.00000000f, 0.74540421f, 1.0f}} |
| static const Color | LIME {vec4{0.00000000f, 1.00000000f, 0.00000000f, 1.0f}} |
| static const Color | LIME_GREEN {vec4{0.03189603f, 0.61049557f, 0.03189603f, 1.0f}} |
| static const Color | LINEN {vec4{0.95597335f, 0.87136712f, 0.79129794f, 1.0f}} |
| static const Color | MAGENTA {vec4{1.00000000f, 0.00000000f, 1.00000000f, 1.0f}} |
| static const Color | MAROON {vec4{0.21586050f, 0.00000000f, 0.00000000f, 1.0f}} |
| static const Color | MEDIUM_AQUA_MARINE {vec4{0.13286832f, 0.61049557f, 0.40197778f, 1.0f}} |
| static const Color | MEDIUM_BLUE {vec4{0.00000000f, 0.00000000f, 0.61049557f, 1.0f}} |
| static const Color | MEDIUM_ORCHID {vec4{0.49102085f, 0.09084171f, 0.65140564f, 1.0f}} |
| static const Color | MEDIUM_PURPLE {vec4{0.29177065f, 0.16202938f, 0.70837578f, 1.0f}} |
| static const Color | MEDIUM_SEA_GREEN {vec4{0.04518620f, 0.45078578f, 0.16513219f, 1.0f}} |
| static const Color | MEDIUM_SLATE_BLUE {vec4{0.19806932f, 0.13843162f, 0.85499261f, 1.0f}} |
| static const Color | MEDIUM_SPRING_GREEN {vec4{0.00000000f, 0.95597335f, 0.32314321f, 1.0f}} |
| static const Color | MEDIUM_TURQUOISE {vec4{0.06480327f, 0.63759687f, 0.60382734f, 1.0f}} |
| static const Color | MEDIUM_VIOLET_RED {vec4{0.57112483f, 0.00749903f, 0.23455058f, 1.0f}} |
| static const Color | MIDNIGHT_BLUE {vec4{0.00972122f, 0.00972122f, 0.16202938f, 1.0f}} |
| static const Color | MINT_CREAM {vec4{0.91309865f, 1.00000000f, 0.95597335f, 1.0f}} |
| static const Color | MISTY_ROSE {vec4{1.00000000f, 0.77582222f, 0.75294222f, 1.0f}} |
| static const Color | MOCCASIN {vec4{1.00000000f, 0.77582222f, 0.46207700f, 1.0f}} |
| static const Color | NAVAJO_WHITE {vec4{1.00000000f, 0.73046074f, 0.41788507f, 1.0f}} |
| static const Color | NAVY {vec4{0.00000000f, 0.00000000f, 0.21586050f, 1.0f}} |
| static const Color | OLD_LACE {vec4{0.98225055f, 0.91309865f, 0.79129794f, 1.0f}} |
| static const Color | OLIVE {vec4{0.21586050f, 0.21586050f, 0.00000000f, 1.0f}} |
| static const Color | OLIVE_DRAB {vec4{0.14702727f, 0.27049779f, 0.01680738f, 1.0f}} |
| static const Color | ORANGE {vec4{1.00000000f, 0.37626212f, 0.00000000f, 1.0f}} |
| static const Color | ORANGE_RED {vec4{1.00000000f, 0.05951124f, 0.00000000f, 1.0f}} |
| static const Color | ORCHID {vec4{0.70110189f, 0.16202938f, 0.67244316f, 1.0f}} |
| static const Color | PALE_GOLDEN_ROD {vec4{0.85499261f, 0.80695226f, 0.40197778f, 1.0f}} |
| static const Color | PALE_GREEN {vec4{0.31398871f, 0.96468625f, 0.31398871f, 1.0f}} |
| static const Color | PALE_TURQUOISE {vec4{0.42869050f, 0.85499261f, 0.85499261f, 1.0f}} |
| static const Color | PALE_VIOLET_RED {vec4{0.70837578f, 0.16202938f, 0.29177065f, 1.0f}} |
| static const Color | PAPAYA_WHIP {vec4{1.00000000f, 0.86315721f, 0.66538730f, 1.0f}} |
| static const Color | PEACH_PUFF {vec4{1.00000000f, 0.70110189f, 0.48514994f, 1.0f}} |
| static const Color | PERU {vec4{0.61049557f, 0.23455058f, 0.04970657f, 1.0f}} |
| static const Color | PINK {vec4{1.00000000f, 0.52711513f, 0.59720179f, 1.0f}} |
| static const Color | PLUM {vec4{0.72305513f, 0.35153260f, 0.72305513f, 1.0f}} |
| static const Color | POWDER_BLUE {vec4{0.43415364f, 0.74540421f, 0.79129794f, 1.0f}} |
| static const Color | PURPLE {vec4{0.21586050f, 0.00000000f, 0.21586050f, 1.0f}} |
| static const Color | REBECCA_PURPLE {vec4{0.13286832f, 0.03310477f, 0.31854678f, 1.0f}} |
| static const Color | RED {vec4{1.00000000f, 0.00000000f, 0.00000000f, 1.0f}} |
| static const Color | ROSY_BROWN {vec4{0.50288646f, 0.27467731f, 0.27467731f, 1.0f}} |
| static const Color | ROYAL_BLUE {vec4{0.05286065f, 0.14126329f, 0.75294222f, 1.0f}} |
| static const Color | SADDLE_BROWN {vec4{0.25818285f, 0.05951124f, 0.00651209f, 1.0f}} |
| static const Color | SALMON {vec4{0.95597335f, 0.21586050f, 0.16826940f, 1.0f}} |
| static const Color | SANDY_BROWN {vec4{0.90466117f, 0.37123768f, 0.11697067f, 1.0f}} |
| static const Color | SEA_GREEN {vec4{0.02732089f, 0.25818285f, 0.09530747f, 1.0f}} |
| static const Color | SEA_SHELL {vec4{1.00000000f, 0.91309865f, 0.85499261f, 1.0f}} |
| static const Color | SIENNA {vec4{0.35153260f, 0.08437621f, 0.02624122f, 1.0f}} |
| static const Color | SILVER {vec4{0.52711513f, 0.52711513f, 0.52711513f, 1.0f}} |
| static const Color | SKY_BLUE {vec4{0.24228112f, 0.61720656f, 0.83076988f, 1.0f}} |
| static const Color | SLATE_BLUE {vec4{0.14412847f, 0.10224173f, 0.61049557f, 1.0f}} |
| static const Color | SLATE_GRAY {vec4{0.16202938f, 0.21586050f, 0.27889426f, 1.0f}} |
| static const Color | SLATE_GREY {vec4{0.16202938f, 0.21586050f, 0.27889426f, 1.0f}} |
| static const Color | SNOW {vec4{1.00000000f, 0.95597335f, 0.95597335f, 1.0f}} |
| static const Color | SPRING_GREEN {vec4{0.00000000f, 1.00000000f, 0.21223076f, 1.0f}} |
| static const Color | STEEL_BLUE {vec4{0.06124605f, 0.22322796f, 0.45641102f, 1.0f}} |
| static const Color | TAN {vec4{0.64447968f, 0.45641102f, 0.26225066f, 1.0f}} |
| static const Color | TEAL {vec4{0.00000000f, 0.21586050f, 0.21586050f, 1.0f}} |
| static const Color | THISTLE {vec4{0.68668531f, 0.52099557f, 0.68668531f, 1.0f}} |
| static const Color | TOMATO {vec4{1.00000000f, 0.12477182f, 0.06301002f, 1.0f}} |
| static const Color | TURQUOISE {vec4{0.05126946f, 0.74540421f, 0.63075714f, 1.0f}} |
| static const Color | VIOLET {vec4{0.85499261f, 0.22322796f, 0.85499261f, 1.0f}} |
| static const Color | WHEAT {vec4{0.91309865f, 0.73046074f, 0.45078578f, 1.0f}} |
| static const Color | WHITE {vec4{1.00000000f, 1.00000000f, 1.00000000f, 1.0f}} |
| static const Color | WHITE_SMOKE {vec4{0.91309865f, 0.91309865f, 0.91309865f, 1.0f}} |
| static const Color | YELLOW {vec4{1.00000000f, 1.00000000f, 0.00000000f, 1.0f}} |
| static const Color | YELLOW_GREEN {vec4{0.32314321f, 0.61049557f, 0.03189603f, 1.0f}} |
Friends | |
| constexpr Color | operator* (const Color &a, const Color &b) |
| Get the result of component-wise multiplication between two colors. | |
| constexpr Color | operator* (const Color &a, float b) |
| Get the result of multiplying a color by a scalar. | |
| constexpr Color | operator* (float a, const Color &b) |
| Get the result of multiplying a scalar by a color. | |
| constexpr Color | operator/ (const Color &a, const Color &b) |
| Get the result of component-wise division between two colors. | |
| constexpr Color | operator/ (const Color &a, float b) |
| Get the result of dividing a color by a scalar. | |
| constexpr Color | mix (Color a, Color b, float alpha) |
| Linearly blend between two colors based on an alpha value. | |
Floating-point linear RGBA color in the Rec.
709 gamut with 32 bits per component.
|
strong |
Color transfer function.
| Enumerator | |
|---|---|
| LINEAR | Linear transfer function. |
| SRGB | sRGB transfer function. |
|
constexprdefaultnoexcept |
Construct a transparent color with a value of 0 in all components.
|
inlinestaticnodiscardconstexpr |
Convert a color component in linear space to the sRGB color space.
| x | normalized linear color component to convert. |
Convert a color in linear space to the sRGB color space.
| rgb | normalized linear color to convert. |
Convert a color in linear space to the sRGB color space.
| rgba | normalized linear color to convert. |
|
inlinestaticnodiscardconstexpr |
Convert a color component in the sRGB color space to linear space.
| x | normalized sRGB color component to convert. |
Convert a color in the sRGB color space to linear space.
| rgb | normalized sRGB color to convert. |
Convert a color in the sRGB color space to linear space.
| rgba | normalized sRGB color to convert. |
|
inlinestaticnodiscardconstexpr |
Convert a linear color from straight to pre-multiplied alpha.
| rgba | normalized linear color with straight alpha to convert. |
|
inlinestaticnodiscardconstexpr |
Convert a linear color from pre-multiplied to straight alpha.
| rgba | normalized linear color with pre-multiplied alpha to convert. |
|
inlinestaticnodiscardconstexprnoexcept |
Create a grayscale color from a linear scalar.
| x | value of the red, green and blue components. |
| a | value of the alpha component. Defaults to fully opaque, i.e. a value of 1. |
|
inlinestaticnodiscardconstexprnoexcept |
Create a color from linear RGB components.
| r | value of the red color component. |
| g | value of the green color component. |
| b | value of the blue color component. |
| a | value of the alpha component. Defaults to fully opaque, i.e. a value of 1. |
Create a color from a vector of 3 components, XYZ, that map to the linear color components RGB, respectively.
The alpha component is set to fully opaque, i.e. a value of 1.
| rgb | input vector containing values for the red, green, and blue components. |
Construct a color from a vector of 4 components, XYZW, that map to the linear color components RGBA, respectively.
| rgba | input vector containing values for the red, green, blue and alpha components. |
|
inlinestaticnodiscardconstexprnoexcept |
Create a color from a vector of 3 components, XYZ, and a scalar, A, that map to the linear color components RGBA, respectively.
| rgb | input vector containing values for the red, green, and blue components. |
| a | value of the alpha component. |
|
inlinestaticnodiscardconstexprnoexcept |
Create a color from sRGB-encoded components.
| r | sRGB-encoded value of the red color component. |
| g | sRGB-encoded value of the green color component. |
| b | sRGB-encoded value of the blue color component. |
| a | value of the alpha component, which is not sRGB-encoded. Defaults to fully opaque. |
|
inlinestaticnodiscardconstexprnoexcept |
Create a color from unnormalized sRGB-encoded components.
| r | unnormalized sRGB-encoded value of the red color component. |
| g | unnormalized sRGB-encoded value of the green color component. |
| b | unnormalized sRGB-encoded value of the blue color component. |
| a | unnormalized value of the alpha component, which is not sRGB-encoded. Defaults to fully opaque. |
|
inlinestaticnodiscardconstexprnoexcept |
Create a color from a vector of 3 sRGB-encoded components, XYZ, and a scalar, A, that map to the color components RGBA, respectively.
| rgb | input vector containing sRGB-encoded values for the red, green and blue components. |
| a | linear value of the alpha component. |
|
inlinestaticnodiscardconstexprnoexcept |
Create a color from a vector of 3 unnormalized sRGB-encoded components, XYZ, and a scalar, A, that map to the color components RGBA, respectively.
| rgb | input vector containing unnormalized sRGB-encoded values for the red, green and blue components. |
| a | unnormalized linear value of the alpha component. |
|
inlinestaticnodiscardconstexprnoexcept |
Create a color from a vector of 3 floating-point sRGB components, XYZ, and a scalar, A, that map to the color components RGBA, respectively.
| rgb | input vector containing floating-point sRGB values for the red, green and blue components. |
| a | linear value of the alpha component. |
|
inlinestaticnodiscardconstexprnoexcept |
Create a color from a vector of 3 sRGB-encoded components, XYZ, and 1 linear component, W, that map to the color components RGBA, respectively.
| rgba | input vector containing sRGB-encoded values for the red, green and blue components, and the linear value of the alpha component. |
Create a color from a vector of 3 unnormalized sRGB-encoded components, XYZ, and 1 linear component, W, that map to the color components RGBA, respectively.
| rgba | input vector containing unnormalized sRGB-encoded values for the red, green and blue components, and the linear value of the alpha component. |
Create a color from a vector of 3 floating-point sRGB components, XYZ, and 1 linear component, W, that map to the color components RGBA, respectively.
| rgba | input vector containing floating-point sRGB values for the red, green and blue components, and the linear value of the alpha component. |
|
inlinestaticnodiscardconstexprnoexcept |
Create a color from a linear alpha component.
| a | value of the alpha component. |
|
nodiscardconstexprdefaultnoexcept |
Compare this color to another for equality.
| other | the color to compare this one to. |
|
inlinenodiscardconstexprnoexcept |
Convert the color to a vector with 3 components, XYZ, that are mapped from the color components RGB, respectively.
|
inlinenodiscardconstexprnoexcept |
Convert the color to a vector with 4 components, XYZW, that are mapped from the color components RGBA, respectively.
|
inlinenodiscardconstexprnoexcept |
Convert the color to a vector with 3 sRGB-encoded components, XYZ, that are mapped from the color components RGB, respectively.
|
inlinenodiscardconstexprnoexcept |
Convert the color to a vector with 3 floating-point sRGB components, XYZ, that are mapped from the color components RGB, respectively.
|
inlinenodiscardconstexprnoexcept |
Convert the color to a vector with 3 sRGB-encoded components, XYZ, and 1 linear component, W, that are mapped from the color components RGBA, respectively.
|
inlinenodiscardconstexprnoexcept |
Convert the color to a vector with 3 floating-point sRGB components, XYZ, and 1 linear component, W, that are mapped from the color components RGBA, respectively.
|
inlinenodiscardconstexprnoexcept |
Get the linear alpha component of the color.
|
inlineconstexprnoexcept |
Set the linear alpha component of the color.
| newAlpha | new alpha component value to set. |
Multiply the component values of this color with their respective component values in another color.
| other | color to multiply this color by. |
|
inlineconstexprnoexcept |
Multiply the component values of this color by a scalar.
| other | scalar to multiply this color by. |
Divide the component values of this color by their respective component values in another color.
| other | color to divide this color by. |
|
inlineconstexprnoexcept |
Divide the component values of this color by a scalar.
| denominator | scalar to divide this color by. |
Multiply the RGB component values of this color by the corresponding values in a 3-component vector.
| rgbCoefficients | vector containing the values to multiply the red, green, and blue components by. |
Multiply the RGBA component values of this color by the corresponding values in a 4-component vector.
| rgbaCoefficients | vector containing the values to multiply the red, green, blue, and alpha components by. |
Divide the RGB component values of this color by the corresponding values in a 3-component vector.
| rgbDenominators | vector containing the values to divide the red, green, and blue components by. |
Divide the RGBA component values of this color by the corresponding values in a 4-component vector.
| rgbaDenominators | vector containing the values to divide the red, green, blue, and alpha components by. |
Get the result of component-wise multiplication between two colors.
| a | left-hand side of the multiplication. |
| b | right-hand side of the multiplication. |
Get the result of multiplying a color by a scalar.
| a | left-hand side of the multiplication. |
| b | right-hand side of the multiplication. |
Get the result of multiplying a scalar by a color.
| a | left-hand side of the multiplication. |
| b | right-hand side of the multiplication. |
Get the result of component-wise division between two colors.
| a | left-hand side of the division. |
| b | right-hand side of the division. |
Get the result of dividing a color by a scalar.
| a | left-hand side of the multiplication. |
| b | right-hand side of the multiplication. |
Linearly blend between two colors based on an alpha value.
| a | color to blend from. |
| b | color to blend towards. |
| alpha | amount to blend each color. |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |