shadcn/ui gives you beautiful components and exactly one rite of passage: an afternoon inside globals.css, hand-tuning CSS variables, wondering why your primary color looks perfect in light mode and like a crime scene in dark mode.
--primary, --primary-foreground, --ring, --chart-3... every variable has a partner, contrast is a real constraint, and "just make it blue" turns into forty small decisions. There's a faster way to get a theme that's actually coherent.
🛠️ Free Tool: shadcn Theme Generator — WebToolsHub — pick colors visually, preview light and dark mode live, and export ready-to-paste CSS variables. Free, in-browser.
Why Hand-Tuned Themes Drift
A shadcn theme isn't one color. It's a system:
- Backgrounds and foregrounds that must pair correctly
- Primary, secondary, accent, and destructive — each with a foreground that stays readable on top of it
- Border, input, and ring colors that harmonize instead of matching by accident
- Chart colors that look like they belong to the same product
- A radius that changes the entire personality of the UI
Change one value in isolation and the system quietly breaks somewhere else — usually the place a user finds first, like a disabled button nobody can read.
The Workflow That Respects Your Afternoon
- Start from intent, not hex codes. "Warm and trustworthy" or "sharp and technical" — pick the feeling, then the base color that carries it.
- Preview in both modes simultaneously. Dark mode is not inverted light mode. If you're only checking one, you're shipping the other on faith.
- Check the pairings, not the colors. Text on primary, text on destructive, muted text on background — contrast lives in pairs.
- Export and paste. The output should be the full variable block for
globals.css, ready for Tailwind v4's@themeor the classic:root/.darksetup.
That's the whole loop the shadcn theme generator is built around: visual picking, live component preview in both modes, and a clean export you paste once.
Your Components Were Never the Problem
shadcn's components are consistent by design — which means when a UI looks "off," it's almost always the theme layer underneath. Fix the system once, and every button, card, and dialog you add inherits the fix.
Spend the afternoon building features. Let the theme take ten minutes.