Color picker
Picks a colour by eye on an area, by number on OKLCH channels, or from presets, and reads any CSS colour typed in. Its sliders are Kino’s Slider, and a picked or typed colour glides every thumb to it.
Examples
Default
An area for saturation and brightness, hue and opacity below it, the value in any format and presets. Here each label opens one in a popover.
Channels
With space="oklch" it edits OKLCH: lightness, chroma and hue on labelled sliders, written as a theme file writes its tokens. A colour past what the screen shows is kept, and the preview says so.
Inline
It needs no popover: here it sits in a settings card beside what the colour changes.
Disabled
Every part fades and takes no input. Say why beside it.
Palette
Presets first. Custom opens what you put inside ColorPickerPalette, and keeps your colour while you try a preset.
Installation
npx shadcn@latest add https://kinoui.com/r/color-picker.json- Files
lib/reduce-motion.tslib/resize.tscomponents/kino/collapsible.tsxlib/track.tslib/number-format.tscomponents/kino/slider.tsxlib/scroll.tslib/refs.tslib/swap.tsxlib/popup.tslib/glide.tsxcomponents/kino/tooltip.tsxlib/cut.tsxcomponents/kino/separator.tsxlib/run-progress.tslib/highlight.tslib/menu.tsxcomponents/kino/input.tsxcomponents/kino/select.tsxcomponents/kino/textarea.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsxcomponents/kino/input-group.tsxlib/choice.tscomponents/kino/color-picker.tsx- Packages
@base-ui/reactclass-variance-authority- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
ColorPicker
ColorPickerPresets
ColorPickerPreset
ColorPickerPalette
ColorPickerSwatch
Data attributes
Accessibility
- The area is two range inputs, saturation and brightness, so touch screen readers can move each one. Arrow keys move by 1%, with Shift by 10%; Page Up and Page Down move brightness, Home and End saturation. Right to left, left and right follow the screen.
- Every value a screen reader reads ends with the colour in words, such as "dark blue, 50% opaque".
- Presets are a radio group: one stop in the tab order, picked with the arrow keys, each named by its label.
- A typed value that isn’t a colour stays in the box and is marked invalid with its icon, not by colour alone.
- The swatches and the area keep their colours in forced colours, and focus shows a system outline.
- When the system asks for less motion, the thumbs jump to a new colour instead of gliding.