Skip to main content

Tailwind Color Generator

Pick a base color and instantly generate a full Tailwind-compatible color scale (50–950). Preview all 11 shades, then copy the tailwind.config.js snippet or CSS custom properties. Works with Tailwind v3 and v4. Everything runs in your browser.

✓ 60K+ developers trust DevPlaybook ✓ Runs 100% in your browser ✓ No sign-up required

Frequently Asked Questions

What is a Tailwind color scale?▼

Tailwind CSS uses a numbered scale from 50 (lightest) to 950 (darkest) for each color. For example, blue-100 is very light blue and blue-900 is very dark. This scale gives you 11 shades per color, providing enough range for backgrounds, borders, text, and hover states without naming individual colors.

How does this tool generate the color scale?▼

The generator converts your base color to HSL (Hue, Saturation, Lightness), then creates 11 shades by adjusting the Lightness value while keeping the Hue constant. This approach matches how Tailwind's built-in palettes are designed, ensuring harmonious transitions between shades.

What shade should I use as my primary brand color?▼

Use shade 500 or 600 as your primary action color (buttons, links) — it's typically the most saturated and visually distinctive. Use 50–200 for light backgrounds and hover states, 700–900 for dark text or pressed states. Your input base color maps closest to shade 500.

How do I add a custom color to my tailwind.config.js?▼

Copy the generated tailwind.config.js snippet and paste it into your tailwind.config.js under theme.extend.colors. This preserves all built-in Tailwind colors and adds your custom palette alongside them. You can then use classes like bg-primary-500, text-primary-900, etc.

What are CSS Custom Properties and when should I use them?▼

CSS Custom Properties (variables) like --color-primary-500 let you use your color scale without Tailwind's build step. Useful for non-Tailwind projects, email templates, or when you need to change themes dynamically at runtime with JavaScript. Reference them in CSS as var(--color-primary-500).

Can I use this with Tailwind v4?▼

Yes. Tailwind v4 uses CSS-first configuration with @theme directive. Copy the CSS variables output, then reference them in your @theme block: --color-primary-500: #3b82f6; This approach also works with Tailwind v3 by pasting into the extend.colors config.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →