type ColorPickerLayout struct {
Content, Saturation, Hue, Alpha, Hex ui.Rect
IDs ColorPickerIDs
Disabled, ShowAlpha bool
}
ColorPickerLayout is also the input geometry. Pointer and Key update a copy
of caller-owned HSV state, using logical pixels at every display scale.
Methods
Key#
func (l ColorPickerLayout) Key(event ui.KeyEvent, v ColorPickerValue) (ColorPickerValue, ui.EventResult)
Key provides two-axis arrows on the color plane and scalar slider keys on
hue/alpha. Shift uses larger steps. Text-field and action keys stay native.
Pointer#
func (l ColorPickerLayout) Pointer(event ui.PointerEvent, v ColorPickerValue) (ColorPickerValue, ui.EventResult)
Pointer handles primary press and captured dragging, including outside the
popup. Other buttons and hover do not change the draft or steal text editing.