shadcn/ui theme generator
Generate a complete shadcn/ui theme from a single color. You get light and dark variables in OKLCH, matching chart and sidebar colors, your fonts and a radius, all in the format shadcn/ui expects with Tailwind v4.
Sample theme variables (default kit, abridged)
This is real output from the generator, using the default kit. Open the editor to make it yours.
@custom-variant dark (&:is(.dark *));
:root {
--radius: 1rem;
--background: oklch(1 0 0);
--foreground: oklch(0.177 0.05 281.8);
--primary: oklch(0.578 0.235 278.3);
--primary-foreground: oklch(1 0 0);
--ring: oklch(0.578 0.235 278.3);
--chart-1: oklch(0.451 0.28 268.8);
}
.dark {
--background: oklch(0.163 0.017 284.4);
--foreground: oklch(0.963 0.008 286.2);
--primary: oklch(0.613 0.214 280.4);
--primary-foreground: oklch(0.163 0.015 284.7);
--ring: oklch(0.613 0.214 280.4);
--chart-1: oklch(0.533 0.236 276.9);
}
@theme inline {
--color-primary-foreground: var(--primary-foreground);
--color-chart-1: var(--chart-1);
}
* { @apply border-border outline-ring/50; }
body { @apply bg-background text-foreground font-sans; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.02em; }
} How it works
- Pick a brand color and fonts, then preview in light and dark mode.
- Open Export and choose shadcn/ui.
- Paste the variables into app/globals.css (or your global stylesheet).
- Run your app. Buttons, inputs, cards and charts now use your brand.
Why OKLCH?
shadcn/ui themes use OKLCH, a perceptually uniform color space. Equal steps look equal to the eye, which makes derived light and dark palettes more consistent than HSL.
Apply the theme
Replace the :root and .dark blocks in your global CSS with the exported ones, and keep the @theme inline mapping. Components pick up the new look without changes. The export also sets the heading font and your radius.
Frequently asked questions
Does it include chart and sidebar colors?
Yes. Five chart colors rotate around your brand hue, and the full sidebar set is included for light and dark.
Is the primary button text readable?
The foreground color is chosen automatically for contrast, and the palette panel shows the exact ratio.
Does it replace the shadcn/ui CLI?
No. It generates the theme CSS only. Install components with the shadcn/ui CLI as usual.