ColorDialog
classin packageklyn.gui.windows.dialogs
public class ColorDialog extends Dialog
└ Widget
└ Dialog
└ ColorDialog

Themed standalone dialog for selecting a color.

The dialog hosts the complete ColorPicker experience and remains modal until the user selects a color or cancels. Use ColorLightBox when the selection must stay embedded in an existing application window.

dialog = ColorDialog(Color.fromHex("#3B82F6"))
if dialog.showDialog(window):
    panel.backgroundColor = dialog.selectedColor
Inherited Attributes
attributeInherited Attributes from Dialog: terminal, title
attributeInherited Attributes from Widget: lastRenderAnsi, lastRenderHeight, lastRenderPlain, lastRenderWidth, layout, visible
Properties
Modifier and Type Member Description
public readonly property selectedColor
selectedColor as Color
Color accepted by the user, or the initial color after cancellation.
Inherited Properties
propertyInherited Properties from Widget: focusable, focused, lastRenderFrame, position, size
propertyInherited Properties from Object: type
Inherited Events
eventInherited Events from Dialog: accepted, cancelled
Constructors
Modifier and Type Member Description
public ColorDialog
ColorDialog( selectedColor as Color = null, title as String = "Select color" )
Creates a modal color-selection dialog.
Methods
Modifier and Type Member Description
public showDialog
showDialog(owner as Window = null) as Boolean
Displays the dialog and blocks until selection or cancellation.
Inherited Methods
methodInherited Methods from Dialog: accept, cancel, close, show
methodInherited Methods from Widget: add, baseAnsiStyle, captureRenderFrame, children, clearChildren, configureCursor, focusNext, handleEvent, handleMouseEvent, hasActiveTextInput, idle, paint, paintToFrame, performLayout, refresh, renderAnsiSnapshot, renderPlainSnapshot, scrollbarThumbGlyph, scrollbarTrackGlyph, terminalPromptVisible
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml