Skip to content

ColorPicker: Once UI's own colour picker, opened by ColorInput - #630

Merged
lorant-one merged 2 commits into
previewfrom
claude/color-picker
Nov 28, 2026
Merged

lorant-one merged 2 commits into
previewfrom
claude/color-picker

Conversation

@lorant-one

Copy link
Copy Markdown
Member

What

A core ColorPicker, and ColorInput now opens it instead of the browser's picker.

  • ColorPicker: saturation/brightness area, hue track, opacity track (supportAlpha), each a keyboard slider (arrows, Shift, Home/End). HEX / RGB / OKLCH switch plus a field that takes any of them. Eyedropper where the browser has EyeDropper. Swatches: theme brand/accent/neutral first, then swatches. onValueChange while dragging, onValueCommit once a pick is done; format/onFormatChange controllable; labels for translation.
  • ColorInput: picker="once" (default) opens ColorPicker in a dropdown, the field stays the control (same pattern as DateInput: no role="button" wrapper, panel is a dialog named after the field). Picks go through the native input, so onChange and form libraries still hear them. picker="native" keeps the old behaviour and the opacity button. New props swatches, pickerLabels.

Checks

  • New color-picker.test.tsx (math, keys, formats, typed values, swatches, value prop, axe); ColorInput tests updated, plus a test that the picker opens and a pick reports.
  • Docs: new Form controls › ColorPicker page (New tag), ColorInput page updated. check:docs clean.
  • bundle-size updated: ./components/ColorPicker 52 KB, ColorInput +12 KB (it now pulls the picker), root +3 KB.

Follow-ups: ColorButton could open the same picker; apps with hand-rolled native pickers (Tavilio design panel, Studio brand kit, Frametic/Motion editors) can switch after release.


Generated by Claude Code

A saturation/brightness area, hue and opacity tracks (keyboard sliders),
a HEX / RGB / OKLCH switch with a field that takes any of them, an
eyedropper where the browser has one, and theme and custom swatches.
ColorInput opens it in a dropdown; picker="native" keeps the browser's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk
@lorant-one
lorant-one merged commit 01bc83f into preview Nov 28, 2026
12 of 13 checks passed
@lorant-one
lorant-one deleted the claude/color-picker branch November 29, 2026 13:44
@lorant-one lorant-one added the approved label Nov 29, 2026 — with Claude
@lorant-one lorant-one mentioned this pull request Nov 29, 2026
12 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants