Skip to content

ColorChooserDialog

Dialog wrapper for the ColorChooser widget.

Parameters:

Name Type Description Default
master Optional[Misc]

Parent widget used for positioning and event binding.

None
title str

Dialog window title (localized).

'color.chooser'
initial_color Optional[str]

Initial color shown in the chooser; defaults to theme background.

None

Events

<<DialogResult>>: Fired when the dialog is closed. Provides event.data with keys: result (ColorChoice|None), confirmed (bool).

show

show(
    position: Optional[tuple[int, int]] = None,
    modal: bool = True,
) -> None

Display the dialog.

on_dialog_result

on_dialog_result(
    callback: Callable[[Any], None],
) -> Optional[str]

Bind a callback fired when the dialog produces a result.

off_dialog_result

off_dialog_result(funcid: str) -> None

Unbind a previously bound dialog result callback.