Color.coerce

static Color.coerce(color)[source]

Coerce a color input into a color.

Parameters

color (str | tuple[int, int, int] | tuple[float, float, float] | Color) – The color input.

Returns

Color | None

Raises

ColorError