Expand description
Parsing for CSS colors.
Enums§
- Represents a channel keyword inside a color.
- Either an angle or a number.
- Either a percentage or a number.
Functions§
- parse_
color_ πfunction Parse one of the color functions: rgba(), lab(), color(), etc. - Return the named color with the given name.
- Parse a CSS color using the specified [
ColorParser
] and return a new color value on success. - Parse the color() function.
- parse_
hsl πParses hsl syntax. - parse_
hwb πParses hwb syntax. - parse_
lab_ πlike - parse_
lch_ πlike - parse_
legacy_ πalpha - parse_
modern_ πalpha - parse_
number πParse a<number>
value. - Parse an
<number>
or<angle>
value. - Parse a
<number>
or<percentage>
value. - parse_
origin_ πcolor Parse the relative color syntax βfromβ syntaxfrom <color>
. - parse_
percentage πParse a<percentage>
value. - parse_
rgb π - Returns true if the relative color syntax pref is enabled.