Expand description
The color prelude.
This includes the most common types in this crate, re-exported for your convenience.
Structs§
- Hsla
- Color in Hue-Saturation-Lightness (HSL) color space with alpha. Further information on this color model can be found on Wikipedia.
- Hsva
- Color in Hue-Saturation-Value (HSV) color space with alpha. Further information on this color model can be found on Wikipedia.
- Hwba
- Color in Hue-Whiteness-Blackness (HWB) color space with alpha. Further information on this color model can be found on Wikipedia.
- Laba
- Color in LAB color space, with alpha
- Lcha
- Color in LCH color space, with alpha
- Linear
Rgba - Linear RGB color with alpha.
- Oklaba
- Color in Oklab color space, with alpha
- Oklcha
- Color in Oklch color space, with alpha
- Srgba
- Non-linear standard RGB with alpha.
- Xyza
- CIE 1931 color space, also known as XYZ, with an alpha channel.
Enums§
- Color
- An enumerated type that can represent any of the color types in this crate.
- HexColor
Error - Error returned if a hex string could not be parsed as a color.
Traits§
- Alpha
- Methods for manipulating alpha values.
- Color
ToComponents - Trait with methods for converting colors to non-color types
- Color
ToPacked - Trait with methods for converting colors to packed non-color types
- Gray
- Trait for returning a grayscale color of a provided lightness.
- Hue
- Trait for manipulating the hue of a color.
- Luminance
- Methods for changing the luminance of a color. Note that these methods are not guaranteed to produce consistent results across color spaces, but will be within a given space.
- Mix
- Linear interpolation of two colors within a given color space.