Tailwind Palette Generator

Generate a complete Tailwind CSS color scale (50–950) from a single base color. Export ready-to-use tailwind.config.js code instantly.

What Is This Tailwind Color Palette Generator?

This free tool generates a complete Tailwind CSS color scale — shades 50 through 950 — from a single base color of your choice. Pick any color, click Generate, and you instantly get 11 perceptually uniform swatches ready to paste into your tailwind.config.js. No manual hex calculations, no trial-and-error in a design tool, no guessing whether shade 200 looks right next to shade 300.

Tailwind's numeric shade system is what makes its utility classes so powerful — bg-brand-50 for subtle backgrounds, text-brand-700 for readable text, border-brand-200 for soft dividers. But creating those 11 shades by hand is slow and error-prone because human color perception is non-linear. This generator handles the math for you. If you need a broader set of palettes to start from, browse our color palette collection first, then bring your favorite into this tool to build the full Tailwind scale.

The output works with both Tailwind CSS v3 and v4. For v3, copy the JavaScript config object directly. For v4, the same hex values can be used in CSS custom properties with the @theme directive. Need to convert a color format before picking your base? Our color converter handles HEX, RGB, and HSL in either direction.

Base Color (Shade 500) #3B82F6
tailwind.config.js

         

How to Use This Tailwind Palette Generator

1 Pick Your Base Color

Use the color picker at the top of the page to select your brand color. This becomes shade 500 — the middle of the scale and the identity of your palette. If you have a hex code from a design file, you can type it directly into the picker's hex field.

2 Generate the Scale

Click the Generate button and the tool instantly produces all 11 shades (50 through 950). Lighter shades are created by blending toward white, darker shades by blending toward black, with weighted ratios that approximate Tailwind's perceptual uniformity curve.

3 Copy Individual Hex Values

Click any swatch in the palette grid to copy its hex value to your clipboard. This is useful for quick prototyping, one-off color references, or when building custom button styles outside of Tailwind utilities.

4 Export the Config

Click the Copy button next to the generated tailwind.config.js snippet. Paste it under theme.extend.colors in your project. Then verify contrast ratios with our WCAG contrast checker to ensure accessibility.

Benefits of Using a Tailwind Palette Generator

Perceptually Uniform Scales

The visual gap between shade 100 and 200 feels the same as between 700 and 800. This consistency is hard to achieve by eye — the generator uses weighted blend ratios that approximate Tailwind's own curve, so your custom palette feels as cohesive as the built-in colors.

Seconds Instead of Hours

Manually selecting 11 shades that work together requires testing each one against backgrounds, text, and borders. This tool produces the full scale from a single color pick — then outputs production-ready config code you can paste directly into your project.

Copy-Paste Config Output

No reformatting needed. The generated code follows Tailwind's exact config structure with shade keys and hex values. Works in v3 projects as-is, and the hex values plug directly into v4's @theme directive.

Accessibility Built In

A full shade scale makes it easier to meet WCAG contrast requirements — use shade 50 or 100 for backgrounds and shade 700 or 800 for text on top of them. Pair the output with a contrast checker to verify every combination passes.

What is the Tailwind CSS Color System?

Unlike traditional CSS frameworks that use a handful of named colors, Tailwind CSS employs a numeric shade system ranging from 50 (lightest) to 950 (darkest). Each number represents a specific brightness level, and the entire scale is designed to be perceptually uniform — meaning the visual difference between 100 and 200 should feel similar to the difference between 700 and 800.

This approach gives developers fine-grained control over color usage. Need a subtle background? Use bg-blue-50. Need a bold heading? Use text-blue-800. The 500 shade serves as the base identity of the color, and all other shades are derived from it. If you are migrating from another framework, check out our Bootstrap color generator for a semantic color approach. To explore more palettes beyond this tool, browse our color palette generator.


Adding Custom Colors

To add a custom color palette to your Tailwind project, you extend the theme object inside tailwind.config.js. Under theme.extend.colors, you define a key (like brand or primary) and provide an object with shade values from 50 to 950. Here is an example:

            module.exports = {
                theme: {
                  extend: {
                    colors: {
                      brand: {
                        50: '#eff6ff',
                        100: '#dbeafe',
                        500: '#3b82f6',
                        900: '#1e3a5f',
                        // ... all shades
                      }
                    }
                  }
                }
              }
         

Once configured, you can use utility classes like bg-brand-500, text-brand-900, or border-brand-200 anywhere in your HTML. Our generator produces exactly this format, so you can copy-paste it directly into your config file. For the official documentation on extending themes, see the Tailwind CSS color customization guide. Need to find the right base color first? Try our color converter tool to switch between HEX, RGB, and HSL formats.


What Do the Shade Numbers (50–950) Mean?

Each shade number in the color scale corresponds to a specific role in UI design:

  • 50–100: Very light tints — ideal for subtle backgrounds, hover states on light surfaces, and disabled element backgrounds.
  • 200–300: Light variants — suitable for borders, dividers, and secondary backgrounds in cards and panels. Explore dark color palettes to see how these tints behave on dark surfaces.
  • 400: A lighter accent — works well for placeholder text, icons, and secondary interactive elements.
  • 500: The base color — your primary brand identity. Used for primary buttons, links, active states, and key UI elements.
  • 600–700: Darker accents — great for button hover states, selected items, and text that needs emphasis without being too heavy.
  • 800–900: Dark shades — perfect for headings, dark backgrounds, and high-contrast text on light surfaces.
  • 950: The darkest shade — introduced in Tailwind v3.3, used for very dark backgrounds, deep shadows, and near-black surfaces with a color tint. Always verify these shades meet WCAG contrast requirements for accessibility.

Why Use a Generator?

Creating a perceptually uniform color scale by hand is tedious and error-prone. Simply lightening or darkening a hex value in equal steps does not produce visually consistent results — human color perception is non-linear, as explained in Wikipedia's overview of color vision. A dedicated generator solves this by:

  • Accuracy: Using weighted mix ratios that approximate Tailwind's own perceptual curve for each shade level.
  • Speed: Generating all 11 shades (50–950) in under a second from a single color pick.
  • Consistency: Ensuring your custom palette feels as cohesive as Tailwind's built-in colors like blue, slate, or emerald. Pair your palette with matching CSS gradients for cohesive page designs.
  • Zero Setup: No design tools, no color theory knowledge, no manual calculations — just pick and export.

How to Use This Tool

Generating a custom color palette takes three simple steps:

  1. Pick a Base Color: Use the color picker at the top to select your brand color. This automatically becomes the 500 shade in your palette.
  2. Generate: Click the "Generate" button. The tool calculates all 11 shades (50 through 950) and displays them as clickable swatches.
  3. Copy & Paste: Click "Copy" on the config output to copy the tailwind.config.js snippet. Paste it directly into your project's config file under theme.extend.colors.

You can also click any individual swatch to copy its hex value to your clipboard — handy for quick prototyping or when building custom button styles outside of Tailwind utilities.


v3 vs v4 Color Configuration

In Tailwind CSS v3, colors are configured via tailwind.config.js using JavaScript objects, which is exactly what this generator outputs. Tailwind v4 introduces a CSS-first configuration approach where you define custom themes using CSS custom properties and the @theme directive:

            @theme {
              --color-brand-50: #eff6ff;
              --color-brand-100: #dbeafe;
              --color-brand-500: #3b82f6;
              --color-brand-900: #1e3a5f;
            }
         

The hex values generated by this tool work in both versions — you just need to format them according to your preferred configuration style. For a deep dive into CSS custom properties, refer to the MDN guide on CSS custom properties. For more on color theory behind these scales, read our guide to color palettes.

Why I Built This Tool

Every time I started a new Tailwind project, I'd hit the same wall: I had a brand color, but I needed the whole scale. So I'd open a design tool, create a rectangle filled with my base color, then manually create 10 more rectangles and try to lighten and darken them in even steps. The result never looked right — shade 200 would look fine but shade 300 would feel like a jump. I'd tweak individual values, squint at the screen, adjust again. Twenty minutes later I'd have a palette that still felt off compared to Tailwind's built-in colors.

I built this generator to solve that specific friction. One click, 11 shades, a config snippet I can paste directly into my project. The mix ratios are tuned to approximate Tailwind's perceptual uniformity curve, so the output actually feels like a native Tailwind palette — not a lopsided gradient. I use it on every new project now, and I keep coming back when a client sends a new brand hex and says "make it work in Tailwind."

If you've ever spent more than five minutes building a color scale by hand, this tool is for you. And if you need inspiration for a starting color, our palette gallery has hundreds of combinations to browse before you commit.

Common Use Cases

Brand Identity Systems

Translate your brand guidelines into a Tailwind-ready palette. Ensure every shade of your primary color is available as a utility class across your entire design system. Use alongside a card generator to build branded component sets.

Component Libraries

Build reusable UI component libraries with consistent color tokens. Buttons, cards, modals, and alerts all reference the same shade scale for visual harmony.

SaaS & Startup MVPs

Ship polished UIs fast. Pick your brand color, generate the full scale, and have a professional-looking theme ready in seconds — no designer needed. Combine with a pastel palette for friendly, approachable interfaces.

Frequently Asked Questions

What is the Tailwind CSS color system?

It is a numeric shade scale from 50 (lightest) to 950 (darkest) designed for perceptual uniformity. Each shade serves a specific UI role — from subtle backgrounds to bold headings — and can be used directly as a utility class like bg-blue-500.

How do I add custom colors to Tailwind CSS?

Add your color under theme.extend.colors in your tailwind.config.js as an object with shade keys (50–950) and hex values. This generator outputs exactly this format.

What do the shade numbers (50–950) mean?

Shade 50 is nearly white with a color tint, 100–200 are light tints for backgrounds, 300–400 are lighter accents, 500 is the base color, 600–700 are darker accents for hover states, and 800–950 are dark shades for text and deep backgrounds.

How is the palette generated from one color?

The tool takes your chosen color as shade 500, then creates lighter shades (50–400) by blending with white and darker shades (600–950) by blending with black, using weighted ratios that approximate Tailwind's perceptual uniformity curve.

Can I use this with Tailwind CSS v4?

Yes. The hex values work in any version. For v4, convert the JS config format to CSS custom properties using the @theme directive — the color values themselves remain identical.

Share This Tool

Found this useful? Share it with your design and development community.

Related Tools

Built by DevPalettes — free tools for developers and designers