Function parse_color_prefix

Source
pub fn parse_color_prefix(s: &str) -> Result<(usize, DynamicColor), ParseError>
Expand description

Parse a color string prefix in CSS syntax into a color.

Returns the byte offset of the unparsed remainder of the string and the parsed color. See also parse_color.

ยงErrors

Tries to return a suitable error for any invalid string, but may be a little lax on some details.