bootstack.dialogs.ColorChooserDialog#
- class bootstack.dialogs.ColorChooserDialog(*, title='', color=None, parent=None)#
Bases:
objectA dialog for choosing a color using a hue/saturation spectrum.
The chooser shows a full-spectrum canvas with a luminance slider below it. Numeric fields on the right allow direct entry in RGB, HSL, or hex notation. A screen dropper (unavailable on macOS) lets the user sample any pixel on the desktop.
- 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: