File include/brisk/graphics/ColorSpace.hpp
¶
ColorSpace
enum¶
enum class ColorSpace
ColorSpaceDefines a set of color spaces.
This enum class represents various color spaces, each of which operates within a defined range of values for its components. These color spaces are used to represent and manipulate colors in different formats, including both linear and gamma-corrected forms, as well as different color representation systems like CIELAB, LMS, etc.
sRGBLinear
enumerator (ColorSpace::sRGBLinear
)¶
sRGB color space in linear format.
The sRGBLinear color space operates in the linear range, where all components (R, G, B) have values between 0 and 1.
sRGBGamma
enumerator (ColorSpace::sRGBGamma
)¶
sRGB color space in gamma-corrected format.
The sRGBGamma color space operates in a gamma-corrected range, where all components (R, G, B) are also between 0 and 1, but corrected for gamma.
DisplayP3Linear
enumerator (ColorSpace::DisplayP3Linear
)¶
Display P3 color space in linear format.
The DisplayP3Linear color space is used with displays supporting P3 gamut, with all components (R, G, B) having values between 0 and 1 in a linear format.
DisplayP3Gamma
enumerator (ColorSpace::DisplayP3Gamma
)¶
Display P3 color space in gamma-corrected format.
The DisplayP3Gamma color space is gamma-corrected, where the P3 display color components (R, G, B) have values between 0 and 1.
CIEXYZ
enumerator (ColorSpace::CIEXYZ
)¶
CIE XYZ color space.
The CIEXYZ color space represents color based on the CIE 1931 XYZ color model. The X, Y, and Z components have ranges between 0 and 100.
CIELAB
enumerator (ColorSpace::CIELAB
)¶
CIE LAB color space.
The CIELAB color space is used to approximate human vision, with the L component ranging from 0 to 100, and the a and b components ranging from -200 to +200.
CIELCH
enumerator (ColorSpace::CIELCH
)¶
CIE LCH color space.
The CIELCH color space is based on the cylindrical representation of the CIELAB color model. The L component ranges from 0 to 100, the C component from 0 to 100, and the H component from 0 to 360 degrees.
OKLAB
enumerator (ColorSpace::OKLAB
)¶
OKLAB color space.
The OKLAB color space is another perceptually uniform color model, with the L component ranging from 0 to 100, and the a and b components ranging from -200 to +200.
OKLCH
enumerator (ColorSpace::OKLCH
)¶
OKLCH color space.
The OKLCH color space is a cylindrical version of the OKLAB model. The L component ranges from 0 to 100, the C component from 0 to 100, and the H component from 0 to 360 degrees.
LMS
enumerator (ColorSpace::LMS
)¶
LMS color space.
The LMS color space is based on the response of the human eye's long, medium, and short-wavelength cones. All components (L, M, S) have values between 0 and 1.
Trichromatic
class¶
template <typename T, ColorSpace Space> Trichromatic
ColorConversionMode
enum¶
enum class ColorConversionMode
ColorConversionModeDefines the modes for adjusting colors after conversion.
This enum class provides different strategies for handling colors that may fall outside the valid range of a given color space during conversion.
None
enumerator (ColorConversionMode::None
)¶
No adjustment to the color.
The color is returned as-is, even if its values are out of the acceptable range for the current color space.
Clamp
enumerator (ColorConversionMode::Clamp
)¶
Clamps the color to the valid range.
The color is adjusted by clamping each component to the nearest boundary of the valid range for the current color space.
Nearest
enumerator (ColorConversionMode::Nearest
)¶
Adjusts the color to the nearest valid value by reducing chroma.
The color is adjusted by reducing its chroma (saturation) to bring it within the valid range of the color space.
Trichromatic
class¶
template <typename T, ColorSpace Space> Trichromatic
srgbGammaToLinear
function (Internal::srgbGammaToLinear
)¶
template <typename T, size_t N>
constexpr SIMD<T, N> srgbGammaToLinear(SIMD<T, N> x)
//////////////////////////
formatter
class¶
template <typename T, Brisk::ColorSpace Space> formatter
Auto-generated from sources, Revision , https://github.com/brisklib/brisk/blob//include/brisk/