Theming
Pick one colour and every skin follows it, in light and dark.
How it works
You give Hue one colour. It builds a scale of eleven shades from it, plus a near-black shade of the same colour, and gives each job its own token: the accent fill and its hover and press, links, focus rings, soft tints and switch tracks.
- Shades are made in OKLCH, so the steps look even whether you start from yellow or violet.
- Every text pair passes WCAG AA, and focus rings and indicators reach 3:1, in light and dark.
- Greys and status colours (danger, success, warning, info) never change, so they keep their meaning.
Pick a colour
Choose a preset to see it on this whole site. Paste its CSS after the tokens, either below skins.css or below the tokens the CLI wrote, and your skins use it too.
:root, .light, [data-theme="light"] { --sk-hue-50: #f2f7ff; --sk-hue-100: #e3edff; --sk-hue-200: #caddff; --sk-hue-300: #a6c7ff; --sk-hue-400: #77a9ff; --sk-hue-500: #4b8cff; --sk-hue-600: #146bff; --sk-hue-700: #0054d8; --sk-hue-800: #0041ab; --sk-hue-900: #002e7f; --sk-hue-950: #001d56; --sk-hue-deep: #000d31; --sk-hue-2: #0097ed; --sk-hue-3: #7780ff; --sk-accent: #146bff; --sk-accent-hover: #005ded; --sk-accent-active: #0053d5; --sk-indicator: #146bff; --sk-accent-subtle: #e3edff; --sk-accent-subtle-fg: #0054d8; --sk-accent-border: #a6c7ff; --sk-link: #0054d8; --sk-ring: #4b8cff; --sk-accent-fg: #ffffff; --sk-indicator-fg: #ffffff;}.dark, [data-theme="dark"] { --sk-hue-50: #f2f7ff; --sk-hue-100: #e3edff; --sk-hue-200: #caddff; --sk-hue-300: #a6c7ff; --sk-hue-400: #77a9ff; --sk-hue-500: #4b8cff; --sk-hue-600: #146bff; --sk-hue-700: #0054d8; --sk-hue-800: #0041ab; --sk-hue-900: #002e7f; --sk-hue-950: #001d56; --sk-hue-deep: #000d31; --sk-hue-2: #0097ed; --sk-hue-3: #7780ff; --sk-accent: #146bff; --sk-accent-hover: #005ded; --sk-accent-active: #0053d5; --sk-indicator: #146bff; --sk-accent-subtle: #0c1f41; --sk-accent-subtle-fg: #a6c7ff; --sk-accent-border: #0054d8; --sk-link: #a6c7ff; --sk-ring: #77a9ff; --sk-accent-fg: #ffffff; --sk-indicator-fg: #ffffff;}@media (color-gamut: p3) { :root, .light, [data-theme="light"] { --sk-hue-50: oklch(0.975 0.013 261); --sk-hue-100: oklch(0.945 0.028 261); --sk-hue-200: oklch(0.895 0.055 261); --sk-hue-300: oklch(0.825 0.094 261); --sk-hue-400: oklch(0.735 0.146 261); --sk-hue-500: oklch(0.655 0.195 261); --sk-hue-600: oklch(0.575 0.243 261); --sk-hue-700: oklch(0.495 0.228 261); --sk-hue-800: oklch(0.415 0.199 261); --sk-hue-900: oklch(0.335 0.16 261); --sk-hue-950: oklch(0.255 0.121 261); --sk-hue-deep: oklch(0.175 0.094 261); --sk-hue-2: oklch(0.655 0.195 245); --sk-hue-3: oklch(0.655 0.195 277); --sk-accent: oklch(0.575 0.243 261); --sk-accent-hover: oklch(0.53 0.243 261); --sk-accent-active: oklch(0.49 0.243 261); --sk-indicator: oklch(0.575 0.243 261); --sk-accent-subtle: oklch(0.945 0.028 261); --sk-accent-subtle-fg: oklch(0.495 0.228 261); --sk-accent-border: oklch(0.825 0.094 261); --sk-link: oklch(0.495 0.228 261); --sk-ring: oklch(0.655 0.195 261); } .dark, [data-theme="dark"] { --sk-hue-50: oklch(0.975 0.013 261); --sk-hue-100: oklch(0.945 0.028 261); --sk-hue-200: oklch(0.895 0.055 261); --sk-hue-300: oklch(0.825 0.094 261); --sk-hue-400: oklch(0.735 0.146 261); --sk-hue-500: oklch(0.655 0.195 261); --sk-hue-600: oklch(0.575 0.243 261); --sk-hue-700: oklch(0.495 0.228 261); --sk-hue-800: oklch(0.415 0.199 261); --sk-hue-900: oklch(0.335 0.16 261); --sk-hue-950: oklch(0.255 0.121 261); --sk-hue-deep: oklch(0.175 0.094 261); --sk-hue-2: oklch(0.655 0.195 245); --sk-hue-3: oklch(0.655 0.195 277); --sk-accent: oklch(0.575 0.243 261); --sk-accent-hover: oklch(0.53 0.243 261); --sk-accent-active: oklch(0.49 0.243 261); --sk-indicator: oklch(0.575 0.243 261); --sk-accent-subtle: oklch(0.245 0.07 261); --sk-accent-subtle-fg: oklch(0.825 0.094 261); --sk-accent-border: oklch(0.495 0.228 261); --sk-link: oklch(0.825 0.094 261); --sk-ring: oklch(0.735 0.146 261); }}Wide colour
Screens that show Display P3 get the fuller OKLCH version of every Hue colour. Other screens get an sRGB value chosen to match. The CSS handles this with a color-gamut media query, so there is nothing to set up.
In your own code
Every token is also a Tailwind colour. --sk-accent gives you bg-sk-accent, text-sk-accent, border-sk-accent and the rest, so your own components change colour with your skins. Tokens lists them all.
export function Notice({ children }: { children: React.ReactNode }) { return ( <p className="rounded-lg bg-sk-accent-subtle px-3 py-2 text-sm text-sk-accent-subtle-fg"> {children} </p> );}