Expand description
Color
Modulesยง
- cache_
key - Hashing and other caching utilities for Color types.
- palette
- Palettes with predefined colors.
- palettes
- palettes
- prelude
- Color preludes
Structsยง
- A98Rgb
- ๐ The Adobe RGB (1998) color space.
- Aces2065_
1 - ๐ The ACES2065-1 color space.
- AcesCg
- ๐ The ACEScg color space.
- Alpha
Color - A color with an alpha channel.
- Chromaticity
- CIE
xychromaticity, specifying a color in the XYZ color space, but not its luminosity. - Display
P3 - ๐ The Display P3 color space, often used for wide-gamut displays.
- Dynamic
Color - A color with a color space tag decided at runtime.
- Flags
- Flags indicating
DynamicColorstate. - Gradient
Iter - The iterator for gradient approximation.
- Hsl
- ๐ The HSL color space
- Hwb
- ๐ The HWB color space
- Interpolator
- An intermediate struct used for interpolating between colors.
- Lab
- ๐ The CIELAB color space
- Lch
- ๐ The cylindrical version of the Lab color space.
- Linear
Srgb - ๐ The linear-light RGB color space with sRGB primaries.
- Missing
- Missing color components, extracted from
Flags. - Oklab
- ๐ The Oklab color space, intended to be a perceptually uniform color space.
- Oklch
- ๐ The cylindrical version of the Oklab color space.
- Opaque
Color - An opaque color.
- Premul
Color - A color with premultiplied alpha.
- Premul
Rgba8 - A packed representation of pre-multiplied sRGB colors.
- Prophoto
Rgb - ๐ The ProPhoto RGB color space.
- Rec2020
- ๐ The Rec. 2020 color space.
- Rgba8
- A packed representation of sRGB colors.
- Srgb
- ๐ The standard RGB color space.
- Unpremultiplied
Gradient Iter - The iterator for gradient approximation.
- Unpremultiplied
Interpolator - An intermediate struct used for interpolating between colors.
- XyzD50
- ๐ The CIE XYZ color space with a 2ยฐ observer and a reference white of D50.
- XyzD65
- ๐ The CIE XYZ color space with a 2ยฐ observer and a reference white of D65.
Enumsยง
- Color
Space Layout - The layout of a color space, particularly the hue component.
- Color
Space Tag - The color space tag for dynamic colors.
- HueDirection
- The hue direction for interpolation.
- Parse
Error - Error type for parse errors.
Traitsยง
- Color
Space - The main trait for color spaces.
Functionsยง
- color
- Parse color string to
AlphaColor<Srgb> - gradient
- Generate a piecewise linear approximation to a gradient ramp.
- gradient_
unpremultiplied - Generate a piecewise linear approximation to a gradient ramp without alpha premultiplication.
- parse_
color - Parse a color string in CSS syntax into a color.
- parse_
color_ prefix - Parse a color string prefix in CSS syntax into a color.
- rgb
- Construct an
AlphaColor<Srgb>from rgb f32, the alpha value will be 1.0 - rgb8
- Construct an
AlphaColor<Srgb>from rgb u8, the alpha value will be 255 - rgba
- Construct an
AlphaColor<Srgb>from rgba f32 - rgba8
- Construct an
AlphaColor<Srgb>from rgba u8 - try_
color - Parse color string to
AlphaColor<Srgb>without panic