OKLCH color picker

Pro

An OKLCH colour picker: a lightness and chroma plane painted per hue with the sRGB and P3 gamut edges drawn on it, hue and alpha sliders, a contrast check, swatches and a generated scale.

A recording of the component itself. With Pro you get its full source and it runs in your app.

What you get

  • Lightness and chroma plane with sRGB and P3 edges drawn on it
  • Reads and writes oklch, hex, rgb and hsl, with gamut mapping
  • WCAG contrast ratio against any background you type
  • Eyedropper, swatches and an 11 step scale copied as CSS variables
  • One TypeScript file in your project, yours to edit. No runtime package.
  • Keyboard, screen reader and reduced motion support; light and dark; your shadcn theme.

Install

npx shadcn@latest add @goodui-pro/color-picker-oklch

Needs a Pro license key in your registry config: two-minute setup. The file lands in components/goodui/color-picker-oklch.tsx.

More Pro components

Wheel picker

A 3D wheel picker: columns roll on a real cylinder with momentum, snap to a row and spring back at the ends. Date, time and custom columns that depend on each other.

Pro

Signature pad

A signature field with real ink: the line thins with speed and thickens with pressure, is smoothed with a spline, and replays itself stroke by stroke. Undo, clear, SVG and PNG export.

Pro

Elastic slider

A slider on a rubber band: the SVG track bends where you pull the thumb and twangs back on release, the value balloon leans with the speed, and wide steps snap with a wobble.

Pro