pub enum Space {
SRGB,
HSV,
LRGB,
XYZ,
CIELAB,
CIELCH,
OKLAB,
OKLCH,
JZAZBZ,
JZCZHZ,
}Expand description
Defines colorspace pixels will take.
Variants§
SRGB
Gamma-corrected sRGB.
HSV
Hue Saturation Value.
A UCS typically preferred for modern applications
LRGB
Linear RGB. IEC 61966-2-1:1999 transferred
XYZ
1931 CIE XYZ @ D65.
CIELAB
CIE LAB. Lightness, red/green chromacity, yellow/blue chromacity.
1976 UCS with many known flaws. Most other LAB spaces derive from this
CIELCH
CIE LCH(ab). Lightness, Chroma, Hue
Cylindrical version of CIE LAB.
OKLAB
OKLCH
Cylindrical version of OKLAB.
JZAZBZ
JzAzBz
https://opg.optica.org/oe/fulltext.cfm?uri=oe-25-13-15131
2017 UCS, intended for uniform hue and HDR colors
JZCZHZ
Cylindrical version of JzAzBz
Implementations§
Source§impl Space
impl Space
Sourcepub fn channels(&self) -> [char; 3]
pub fn channels(&self) -> [char; 3]
Returns 3 channels letters for user-facing colorspace controls
Sourcepub const fn srgb_quants(&self) -> [[f32; 3]; 101]
pub const fn srgb_quants(&self) -> [[f32; 3]; 101]
Retrieves a map from a given Space back to SRGB.
This is useful for things like creating adjustable values in Space that represent most of the SRGB range without clipping. Wrapping Hue values are set to f32::INFINITY