bootstack.dialogs.ColorChoice#

class bootstack.dialogs.ColorChoice(rgb, hsl, hex)#

Bases: NamedTuple

A color selected from ColorChooserDialog or ask_color.

hex: str#

The color as a lowercase hex string, e.g. '#ff0000'.

hsl: Tuple[int, int, int]#

The color as an (h, s, l) tuple — hue 0–360, saturation and luminance 0–100.

rgb: Tuple[int, int, int]#

The color as an (r, g, b) tuple, each component 0–255.

count(value, /)#

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)#

Return first index of value.

Raises ValueError if the value is not present.