color_to_triple#

color_to_triple(color: Optional[str] = None) Tuple[int, int, int][source]#

Given a PIL ImageColor string, return a triple of integers representing the red, green, and blue values.

If color is None, return a random color.

Parameters

color (Optional[str]) – A PIL ImageColor string

Returns

An triple of integers

Return type

Tuple[int, int, int]