Tailwind v4 theme generator

Tailwind CSS v4 theme generator

Tailwind CSS v4 is configured in CSS. Pick a brand color and two fonts, preview them on a real page, and copy a ready-made @theme block with a full color scale, semantic colors for light and dark mode, and fluid text sizes.

Sample @theme output (default kit)

This is real output from the generator, using the default kit. Open the editor to make it yours.

@import "tailwindcss";
@theme {
  --color-brand-50: #efeefb;
  --color-brand-100: #d8d6f9;
  --color-brand-200: #bfbcf9;
  --color-brand-300: #a39ffa;
  --color-brand-400: #8680fc;
  --color-brand-500: #635bff;
  --color-brand-600: #3329f9;
  --color-brand-700: #150bdb;
  --color-brand-800: #140d9a;
  --color-brand-900: #110d5b;
  --color-brand-950: #090821;
  --color-brand-strong: var(--brand-strong);
  --font-heading: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-h1: clamp(2.9875rem, calc(2.5967rem + 1.737vw), 3.8125rem);
  --text-h1--line-height: 1.1;
  --text-body-md: 1rem;
  --text-body-md--line-height: 1.6;
  --radius-brand: 16px;
}
}
}
  body { background: var(--color-surface); color: var(--color-ink); font-family: var(--font-body); }
  h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.02em; color: var(--color-ink-strong); }
}

How it works

  1. Choose your brand color and fonts in the editor.
  2. Check contrast and the 50–950 scale in the palette panel.
  3. Open Export and choose Tailwind v4.
  4. Paste the block into your CSS and start using bg-brand-500, font-heading and text-h1.

What you get

An 11-step brand scale (50–950) anchored on your exact color, so utilities like bg-brand-500 and text-brand-700 work immediately. Semantic names such as bg-surface, text-ink and border-line follow light and dark mode through CSS variables.

Fonts become font-heading and font-body. Text sizes become text-h1 to text-h6 and text-body-lg to text-body-sm, each with a fluid clamp() value and a line height.

Install it

Paste the output into your main CSS file (for example app/globals.css) after the Tailwind import. Load the two fonts with your framework’s font loader, or self-host them. To switch to dark mode, set data-theme="dark" on the html element.

Frequently asked questions

Does this work with Tailwind v3?

The @theme syntax is for Tailwind v4. For v3, use the JSON tokens or CSS variables export and map them in tailwind.config.js.

Can I keep my existing theme?

Yes. Paste only the variables you want. Everything uses standard Tailwind v4 namespaces (--color-*, --font-*, --text-*, --radius-*).

Is the scale accessible?

The palette panel checks body, heading, muted and button text against WCAG AA for both light and dark mode.