Skip to main content

Module color_picker

Module color_picker 

Expand description

Event-driven: each press latches a DragTarget so a drag continues to track the cursor even after it leaves the widget rect (see wants_pointer_capture). All visuals pull colours from theme tokens — no literal palette values live in this file.

The selected colour can stay widget-local, bind to typed process-local state with ColorPicker::from_state, or be observed with on_change for an app-owned durable mutation.

Two optional parts extend the inline picker:

The saturation/value field and hue strip paint the real HSV gradients the pointer maps into; every chrome colour (edges, rings, labels, buttons) comes from theme tokens.

Structs§

ColorPicker

Enums§

ColorPickerOutcome
How a confirming picker closed (see ColorPicker::confirming).
DragTarget
Which sub-control owns the current pointer drag, set on press and routed CursorMoved to the matching set_* helper until release.