Free tool
Theme builder
Pick a brand colour, neutral tint and radius. Get a full shadcn token set in OKLCH for light and dark, checked for contrast.
Brand colour
Neutrals and shape
Contrast check
- 16.99 to 1 in light mode,AAA17.66 to 1 in dark mode,AAA
Foreground on background
- 4.98 to 1 in light mode,AA5.70 to 1 in dark mode,AA
Primary foreground on primary
- 5.63 to 1 in light mode,AA7.60 to 1 in dark mode,AAA
Muted foreground on background
- 13.24 to 1 in light mode,AAA13.83 to 1 in dark mode,AAA
Secondary foreground on secondary
Palette
Light
Dark
Live preview
Revenue
$18,460
Create your account
Start a 14-day trial. No card needed.
Pro
Most popular$24/ month
- Unlimited projects
- Custom domains
- Team roles and audit log
- Priority support
Cancel any time.
:root {
--radius: 0.75rem;
--background: oklch(0.985 0.004 262);
--foreground: oklch(0.21 0.035 262);
--card: oklch(1 0 0);
--card-foreground: oklch(0.21 0.035 262);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.21 0.035 262);
--primary: oklch(0.55 0.235 262);
--primary-foreground: oklch(0.99 0 0);
--secondary: oklch(0.955 0.012 262);
--secondary-foreground: oklch(0.27 0.04 262);
--muted: oklch(0.96 0.008 262);
--muted-foreground: oklch(0.505 0.03 262);
--accent: oklch(0.945 0.029 262);
--accent-foreground: oklch(0.3 0.091 262);
--destructive: oklch(0.58 0.22 27);
--destructive-foreground: oklch(0.99 0 0);
--border: oklch(0.915 0.012 262);
--input: oklch(0.89 0.014 262);
--ring: oklch(0.55 0.235 262);
--chart-1: oklch(0.55 0.235 262);
--chart-2: oklch(0.74 0.14 205);
--chart-3: oklch(0.6 0.22 295);
--chart-4: oklch(0.78 0.16 75);
--chart-5: oklch(0.68 0.19 155);
}
.dark {
--background: oklch(0.155 0.018 262);
--foreground: oklch(0.965 0.006 262);
--card: oklch(0.195 0.02 262);
--card-foreground: oklch(0.965 0.006 262);
--popover: oklch(0.205 0.022 262);
--popover-foreground: oklch(0.965 0.006 262);
--primary: oklch(0.66 0.193 262);
--primary-foreground: oklch(0.2 0.03 262);
--secondary: oklch(0.25 0.024 262);
--secondary-foreground: oklch(0.95 0.008 262);
--muted: oklch(0.235 0.02 262);
--muted-foreground: oklch(0.71 0.025 262);
--accent: oklch(0.275 0.04 262);
--accent-foreground: oklch(0.93 0.03 262);
--destructive: oklch(0.66 0.2 25);
--destructive-foreground: oklch(0.2 0.03 25);
--border: oklch(0.285 0.022 262);
--input: oklch(0.32 0.025 262);
--ring: oklch(0.66 0.193 262);
--chart-1: oklch(0.66 0.193 262);
--chart-2: oklch(0.78 0.13 205);
--chart-3: oklch(0.7 0.19 295);
--chart-4: oklch(0.82 0.15 75);
--chart-5: oklch(0.75 0.17 155);
}
How the theme builder works
Choose a brand hue and chroma (or paste a hex), a neutral tint and a corner radius. The builder generates the full shadcn/ui token set in OKLCH for light and dark mode, previews it on real components and checks WCAG contrast before you copy it into globals.css.
- How do I change the shadcn/ui theme colours?
- shadcn/ui reads colours from CSS variables such as --background, --primary and --border in :root and .dark. Generate a set here and replace those variables in your globals.css; every component picks them up.
- Why does the theme use OKLCH colours?
- OKLCH is perceptually uniform, so changing lightness keeps the hue looking the same and contrast is easier to predict. shadcn/ui and Tailwind CSS v4 both use OKLCH by default.
More from the workshop
Gradient Generator
Linear, radial and conic gradients with draggable stops. Copy as CSS or Tailwind.
Shadow Generator
Stack soft, layered box-shadows that look like real light. Copy as CSS or Tailwind.
Glass Generator
Tune blur, tint, border and noise for frosted-glass surfaces over any backdrop.
Spring Playground
Feel stiffness, damping and mass before you ship. Copy a Motion transition or a CSS linear() easing.