042
An OKLCH colour picker that shows you the real shape of sRGB for each hue, tells you how the colour reads on white and black, and copies it as OKLCH or hex.
akacolor picker·colour picker·oklch
Run this in any project set up for the shadcn CLI. It copies the Colour Field source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/colour-field.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { ColourField } from "@/components/colour-field";
export default function Page() {
return <ColourField />;
}A free React component in the Forms collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Colour Field source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| value | Oklch | — |
| defaultValue | Oklch | { l: 0.62, c: 0.19, h: 259 } |
| onValueChange | (colour: Oklch) => void | — |
| label | string | "Colour" |
| className | string | — |