Skip to main content

parse_str

Parse a string representing a color to an RGBA tuple.

def parse_str(
value: str
) - > RGBA

Parse a string representing a color to an RGBA tuple.

Parameters

NameTypeDescription
valuestrA string representing a color, supporting named colors, hex formats (short and long), and functional rgb/rgba/hsl notation.

Returns

TypeDescription
RGBAAn RGBA tuple parsed from the input string.