Skip to contentKino
Skip to Content

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.

npx shadcn add https://kinoui.com/r/color-picker.json
Share on

Examples

Labels

Colours show on every issue that has the label.
Design24 issues
Bug9 issues
Customer request17 issues

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.

Accent

Charts, highlights and the progress of a cycle.

This screen can’t show this colour, so it’s drawn as the nearest one it can.

Lightness
60%
Chroma
0.150
Hue
160°
Opacity
100%
--accent-brand: oklch(0.6 0.15 160);

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.

Brand colour

Used for buttons, links and the selected item across your workspace.
Value
Kino

Amara moved KIN-214 Checkout fails on saved cards to In review.

Cycle 14 · 6 of 9 done

Inline

It needs no popover: here it sits in a settings card beside what the colour changes.

Brand colour

Set by your organisation’s admins for every workspace.
Value
Kino

Amara moved KIN-214 Checkout fails on saved cards to In review.

Cycle 14 · 6 of 9 done

Disabled

Every part fades and takes no input. Say why beside it.

New project

Its colour marks its issues and its cycles.
Mobile app

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

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

ColorPicker

PropTypeDefaultDescription
valuestringNoneThe colour, when you hold the state: hex, rgb(), hsl(), oklch(), color(srgb …) or transparent. A value it can’t read, such as a colour’s name, leaves the colour where it was.
defaultValuestringNoneThe colour it starts at, when it holds its own state.
onValueChange(value) => voidNoneCalled on every change, each step of a drag included, with the colour written in format.
onValueCommitted(value) => voidNoneCalled once a drag, a key, a typed value or a preset ends.
space'hsb''oklch''hsb'The space it edits in. HSB suits ColorPickerArea; OKLCH suits the channel sliders and keeps colours past sRGB. ColorPickerHue follows it.
format'hex''rgb''hsl''oklch''hex', or 'oklch' in the OKLCH spaceHow the value is written. defaultFormat and onFormatChange go with it.
disabledbooleanfalseDisables every part.

ColorPickerPresets

PropTypeDefaultDescription
presets{ value: string; label?: string }[]NoneThe colours, each with a name for screen readers. Without a name, it’s described in words, such as "dark blue".

ColorPickerPreset

PropTypeDefaultDescription
valuestringNoneThe colour, in any CSS format the picker reads.
labelstringNoneIts name for screen readers. Without one, it’s described in words.

ColorPickerPalette

PropTypeDefaultDescription
presets{ value: string; label?: string }[]NoneThe colours before Custom, as ColorPickerPresets takes them.
childrenReactNodeNoneWhat Custom opens, such as ColorPickerArea, ColorPickerHue and ColorPickerInput.

ColorPickerSwatch

PropTypeDefaultDescription
colorstringNoneAny CSS colour. A see-through one shows the checkerboard through it.

Data attributes

AttributeOnDescription
data-disabledColorPicker, ColorPickerAreaPresent while it is disabled.
data-followingColorPickerAreaPresent while a drag moves the thumb, which then follows without gliding.
data-checkedEach presetPresent on the preset that matches the colour.

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.