Component packs › Livery › Contrast Picker
Pick an accent and the contrast ratios update live with AA and AAA marks; Fix it snaps to the nearest shade that passes.
Contrast Picker is an accent picker with contrast from Livery, a component pack with 8 components: Theme switcher components where every change repaints the page, not just the control. Price: $2 for the whole pack.
Built with: live WCAG ratios, snap to passing shade, saturation and lightness plane.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | ||
dark | boolean | ||
autoplay | boolean | ||
onChange | (c: { hex: string; onAccent: number; onWhite: number; onDark: number }) => void |
set(hex: string): voidfix(): voiddestroy(): voidimport ContrastPicker from './ContrastPicker';
<ContrastPicker />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Theme and dark mode.