Expand description
CSS color values.
Structsยง
- Hsl
- Color specified by hue, saturation and lightness components.
- Hwb
- Color specified by hue, whiteness and blackness components.
- RGBA
- A color with red, green, blue, and alpha components, in a byte each.
Enumsยง
Constantsยง
- OPAQUE ๐
Functionsยง
- black ๐
- clamp_
floor_ ๐256_ f32 - clamp_
unit_ ๐f32 - color_
to_ rgba - map_
color_ ๐parse_ error - Turn a short-lived [
cssparser::ParseError] into a long-livedParseError. - normalize_
hue ๐ - Normalizes
h(a hue value in degrees) to be in the interval[0.0, 1.0]. - parse_
name ๐ - Parse a custom property name.
- parse_
plain_ ๐color - parse_
var_ ๐with_ fallback - resolve_
alpha ๐ - Takes the
opacityproperty and an alpha value from a CSS<color>and returns a resulting alpha for a computed value. - resolve_
color - Resolves a CSS color from itself, an
opacityproperty, and acolorproperty (to resolvecurrentColor).