ColorX - Tailwind & shadcn/ui Theme Generator with Live Preview

From one color to a production-ready theme

ColorX turns a single brand color into everything a modern front end needs: an 11-step 50–950 scale, semantic tokens for light and dark mode, and contrast checks on realistic layouts. Copy the result straight into Tailwind CSS or shadcn/ui. Everything runs in your browser.

How it works

  1. 01

    Pick a color

    Choose from Tailwind, Material, Flat UI, CSS named or brand colors, or paste any HEX, RGB, HSL or OKLCH value.

  2. 02

    Check it on real UI

    Preview a landing page, dashboard and components in light and dark mode. Contrast ratios update live; step through shades with ← → until every check passes.

  3. 03

    Copy the code

    Copy a single value, or export the whole theme for shadcn/ui, Tailwind v4, Tailwind v3 or plain CSS variables.

Export formats

shadcn/ui
Full :root and .dark token sets. Replace the variables in your globals.css.
Tailwind CSS v4
An @theme block. Add it to your main CSS file to get bg-brand-500 and friends.
Tailwind CSS v3
A colors entry for theme.extend in tailwind.config.js.
CSS variables
--brand-50 … --brand-950 on :root, for any stack.

Keyboard shortcuts

  • Random colorSpace
  • Previous / next shade←→
  • UndoCtrlZ
  • RedoCtrlShiftZ
  • Focus previewF

FAQ

How is the scale generated?

Official palettes (Tailwind, Material, Flat UI) keep their original shades. Other colors are placed on the shade closest to their lightness, and the rest of the scale follows Tailwind’s lightness and chroma curves in OKLCH, clamped to sRGB.

Which contrast standard is used?

WCAG 2.x contrast ratios: AAA ≥ 7, AA ≥ 4.5, and AA Large ≥ 3 (for text 24px+ or bold 19px+).

Is anything uploaded?

No. ColorX runs entirely in your browser. The current color lives in the URL, so you can bookmark or share a theme.

More tools