ColorPicker is the panel ColorInput opens. Use it on its own where the picker should stay on screen: a theme editor, a side panel, a popover you place yourself.
- Area and tracks: drag the saturation and brightness area, the hue track and, with supportAlpha, the opacity track. Each is a slider for the keyboard too: arrow keys, Shift for bigger steps, Home and End.
- Formats: a switch between HEX, RGB and OKLCH. HEX and OKLCH have one compact field that takes a colour typed in any format (on Enter or blur); RGB has a field per channel, plus A with supportAlpha, each stepped by the arrow keys (Shift by 10). onValueChange reports the colour in the chosen format; format and onFormatChange control it.
- Eyedropper: picks a colour from anywhere on screen, where the browser offers it (Chromium today). Hidden elsewhere, or with eyeDropper={false}.
- Swatches: the theme's brand, accent and neutral colours come first (themeSwatches={false} hides them), then your swatches.
ColorInput opens this picker by default. swatches and pickerLabels pass through to it, and picker="native" brings back the browser's own picker.
onValueChange fires on every move of a drag, for a live preview. onValueCommit fires once when the pointer lets go, a key changes the colour, or a typed value or swatch is taken: save, send or record an undo step there.
labels names the controls for assistive technology: area, hue, alpha, eyeDropper, format, the RGB fields red, green and blue, swatches, and the theme swatches brand, accent and neutral. Whatever you leave out stays English.