Module parsing

Source
Expand description

Parsing for CSS colors.

EnumsΒ§

ChannelKeyword
Represents a channel keyword inside a color.
NumberOrAngleComponent
Either an angle or a number.
NumberOrPercentageComponent
Either a percentage or a number.

FunctionsΒ§

parse_color_function πŸ”’
Parse one of the color functions: rgba(), lab(), color(), etc.
parse_color_keyword
Return the named color with the given name.
parse_color_with
Parse a CSS color using the specified [ColorParser] and return a new color value on success.
parse_color_with_color_space πŸ”’
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_number_or_angle πŸ”’
Parse an <number> or <angle> value.
parse_number_or_percentage πŸ”’
Parse a <number> or <percentage> value.
parse_origin_color πŸ”’
Parse the relative color syntax β€œfrom” syntax from <color>.
parse_percentage πŸ”’
Parse a <percentage> value.
parse_rgb πŸ”’
rcs_enabled
Returns true if the relative color syntax pref is enabled.

Type AliasesΒ§

IntoLabFn πŸ”’
IntoLchFn πŸ”’