Color

Tailwind Theme Generator

Generate a full Tailwind + shadcn/ui theme from a few base colors.

  • Free forever
  • No sign-up
  • Runs in your browser
Share X LinkedIn

Primary

#6366F1

Accent

#EC4899

Neutral / gray

#71717A

Primary scale (50–950)

Accent scale (50–950)

Live preview

Create your account

Enter your email below to get started.

you@example.com
ContinueCancelAccentDelete
Muted surface — used for subtle panels and hints.
EXPORT

Click any swatch in the scales to copy its hex. Your three base colors are encoded in the address bar, so the share link rebuilds the exact theme.

What is a Tailwind theme generator?

A Tailwind theme generator turns a handful of base colors into the full set of values a real project needs: a complete numbered color scale, the semantic tokens that drive a component library, and a matching dark mode — all consistent, all ready to paste in. Instead of hand-tuning eleven shades of your brand color and then guessing at a dozen UI tokens, you pick a primary, an accent and a neutral, and the rest is derived for you.

The tool above is built specifically for the Tailwind CSS + shadcn/ui stack that a huge share of modern apps use. It produces a 50–950 scale for your primary and accent colors, the shadcn semantic tokens for both light and dark mode, a live mock UI so you can see the theme on real components, and three export formats so the output drops into any project.

Everything runs in your browser. There is no sign-up, no AI step, and no credit meter — just color math and copy-ready code.

Design tokens in plain terms

A design token is a named decision about how your interface looks. Rather than scattering raw hex codes through your components, you give each role a name — background, foreground, border, primary — and point your components at those names. Change the token in one place and the whole UI follows.

This matters for three reasons:

  • Consistency. Every button that uses primary is guaranteed to match. There is no drift between a #6366f1 here and a #6463ef there.
  • Theming. Light and dark mode become trivial: the same component reads background, and you simply swap what background resolves to.
  • Handoff and maintenance. A token name communicates intent. "Use muted-foreground for the hint text" is clearer and more durable than a hex code in a code review.

This generator produces both halves of a token system: the raw scale (named shades you can reference directly, like primary-600) and the semantic layer (role-based tokens like primary and destructive that map onto those shades).

What a Tailwind color scale is

Tailwind expresses each color as a scale of numbered steps — 50, 100, 200, all the way to 950. Lower numbers are lighter; higher numbers are darker. 500 usually sits in the middle as the "default" shade of that color.

This numbering is what lets you write bg-primary-50 for a faint tinted background, text-primary-700 for readable colored text, and border-primary-200 for a soft border — all from a single base color, all visually related. The generator builds this scale by holding your color's hue steady and stepping its lightness (and gently adjusting saturation at the extremes, so the lightest tints do not look washed out and the darkest shades stay rich). Click any swatch in the scale to copy that exact hex. If you just need the tints and shades of one color outside a full theme, the color shades & tints generator does exactly that.

How shadcn/ui theming works

shadcn/ui does not ship a fixed palette. Instead, its components reference CSS custom properties — variables like --background, --foreground, --primary and --border — and you define those variables in your stylesheet. The values are written in a specific h s% l% format (hue, saturation, lightness without the hsl() wrapper), which is what Tailwind composes into the final color.

The pattern is two blocks:

  • :root { … } holds the light mode values.
  • .dark { … } holds the dark mode values.

When the dark class is on the html element, the dark values win; otherwise the root values apply. This generator outputs exactly that structure, with every semantic token filled in for both modes, so you can paste it straight into your global CSS and your shadcn components immediately adopt the theme.

Light and dark token pairs

Good dark mode is not "invert the colors." It is a paired set of decisions: dark surfaces, light text, primary and accent colors nudged brighter so they keep their punch against a dark background, and borders that are visible without being harsh.

The generator handles those pairings for you. For each semantic token it produces a light value and a dark value that are designed to work together:

  • Surfaces (background, card, popover) go near-white in light mode and deep, slightly tinted in dark mode.
  • Text (foreground, muted-foreground) flips to light tones in dark mode while keeping a readable hierarchy.
  • Primary and accent stay saturated, but lift in lightness in dark mode so they remain legible.
  • Borders and inputs are subtle in both modes — light gray on white, soft light-on-dark in the dark theme.

Use the light/dark toggle on the live preview to check both before exporting. The mock card, buttons and input show you how the tokens read on actual UI, not just as isolated swatches.

How to use it

  1. Pick your base colors — a primary (your brand color), an accent (for highlights), and a neutral that sets the temperature of your grays. If you don't have a set in mind yet, start in the color palette generator to find colors that work together.
  2. Review the scales. The 50–950 rows update live; click any swatch to copy its hex.
  3. Preview the UI. Watch the mock card, buttons and input adopt the theme, and toggle light/dark to check both modes.
  4. Export. Copy the shadcn CSS variables for a shadcn project, the Tailwind config block for the raw scales, or the JSON tokens for a custom pipeline or another framework.
  5. Share or bookmark. Your three base colors are encoded in the URL, so "Copy share link" hands someone the exact theme.

Dropping the output into a project

  • shadcn/ui project: paste the CSS variables block into your global stylesheet (the one with @tailwind base; @tailwind components; @tailwind utilities;). The :root and .dark blocks are all you need — your components already reference these variables.
  • Plain Tailwind project: paste the Tailwind config block into tailwind.config.js under theme.extend.colors. You can then use bg-primary-500, text-accent-700, and the rest across your markup.
  • Anything else: the JSON export gives you the full scale and both token sets as plain data, ready to feed into a Style Dictionary pipeline, a native app, or a design tool import.

Free and framework-agnostic, with no AI gate

Plenty of theme builders hide the good parts behind a sign-up, drip out colors with an AI generator you have to pay for, or lock the export until you upgrade. This one does none of that. The math is deterministic and runs entirely in your browser, every format is one click away, and the whole theme lives in a shareable URL.

It is also not tied to one framework's hosted product. The Tailwind config, the shadcn variables and the JSON are standard formats you can take anywhere — into a new project, an existing codebase, or a design system of your own. Pick three colors, check the preview, copy the format you need, and ship.

Frequently asked questions

Comet's got your back

Stuck on something? Every tool has a short guide and FAQ — and Comet can point you to the right spot.

Visit help centre

Related tools

All Color tools →