bootstack.dialogs.ColorChooserDialog#
- class bootstack.dialogs.ColorChooserDialog(*, title='', value=None, parent=None)#
Bases:
objectA dialog for choosing a color.
The chooser has two tabs: a Themed tab of the active theme’s color bands, and a Custom tab with a hue/saturation spectrum and luminance slider. Numeric fields on the right allow direct entry in RGB, HSL, or hex notation.
- Parameters:
- property result: ColorChoice | None#
The selected color, or
Noneif canceled.Returns a
ColorChoicenamedtuple with three attributes:rgb—(r, g, b)tuple, each 0–255.hsl—(h, s, l)tuple: hue 0–360, saturation and luminance 0–100.hex— lowercase hex string, e.g.'#ff0000'.
- show(*, position=None, modal=True)#
Display the dialog and block until it is closed.
- Parameters:
- Returns:
self— allows chaining –dlg = ColorChooserDialog(...).show(); dlg.result.- Return type: