Design

Tailwind Color Palette Generator

Generate accessible Tailwind color palettes and export them as config, CSS variables, or SCSS with one click.

Base Color

Click to change

Palette Type

0 colors
ShadePreviewHEXRGBHSLOKLCHActions

Understanding Tailwind CSS Color Palettes

A strong tailwindcss color palette is the foundation of any modern web application. Tailwind relies on a unified token system, spanning light to dark (50 to 950) that ensures accessible contrast throughout your entire component design system. Using our tailwind color generator, you can bypass the tedious process of interpolating HSL strings and immediately start constructing harmonized views.

How Our Tailwind Color Palette Generator Works

To construct a custom tailwind color palette, simply click the Base Color square at the top of the form, or enter a raw HEX value. Our tool automatically computes 11 uniform color stops scaling precisely towards white (50) and black (950) while holding the middle balance at (500), mirroring Tailwind's native design tokens. We also render the OKLCH values which provide incredibly smooth and perceptually uniform gradients compared to standard RGB interpolation.

Exporting Your Tailwind Colors Palette

Speed is critical when expanding your UI. Rather than copying 11 distinct hex codes, use the Export Tailwind Config button beneath your color preview. This instantly structures your exact values into the colors: { custom: { ... } } object expected by tailwind.config.js or tailwind.config.ts configuration files, letting you jump back into coding UI classes immediately.

Generating Complementary & Analogous Schemes

Sometimes you need more than just one unified scale. By selecting 'Analogous' or 'Triadic' beneath the 'Palette Type' radio buttons, the generator spreads its color algorithm across the color wheel. For example, a Triadic setup calculates your base HEX, shifting focus equally 120 and 240 degrees outwards. You're left with multiple sub-colors ready for immediate pairing on buttons, badges, and alerts.

From one color to a working palette

Pick a base color — your brand color, a color you sampled from a photo, or a random starting point — choose a palette type, and the generator produces a full set of named shades with values in HEX, RGB, HSL, or OKLCH. Every shade can be copied individually, and whole palettes export as CSS custom properties, SCSS variables, or a Tailwind config block ready to paste into a project.

The default “Shades” mode builds the scale most design systems are organised around: eleven steps from near-white to near-black, named 50 through 950 exactly like Tailwind’s built-in palettes, with your base color anchoring the middle of the ramp.

Building a Tailwind color scale

Tailwind ships beautiful palettes, but the moment a project has a brand color you need a custom scale that behaves like the built-ins — a brand-500 with usable 50/100 tints for backgrounds and 800/900 shades for text and hover states. That is what the shade generator produces: enter the brand color, generate, and copy the Tailwind export into theme.extend.colors in your config. Utility classes like bg-brand-100 or text-brand-800 work immediately.

The conventional roles in a 50–950 scale: 50–100 for tinted backgrounds and hover washes, 200–300 for borders and dividers, 400–600 for the interactive core (buttons, links, focus rings — your base usually lands at 500), and 700–950 for text on light backgrounds and dark-mode surfaces. Keeping those roles consistent across every color in the system is what makes a UI feel coherent.

Color harmony modes, explained

Beyond shade ramps, the generator builds palettes from classical color-wheel relationships. Complementary picks the hue directly opposite yours — maximum contrast, good for a single bold accent against a dominant brand color. Split-complementary takes the two neighbours of the complement instead, keeping the contrast while softening the tension, which makes it one of the safest schemes for beginners.

Analogous palettes use adjacent hues for a harmonious, low-contrast feel common in editorial and nature-themed design. Triadic spaces three hues evenly around the wheel for balanced variety; tetradic yields two complementary pairs, which is rich but demands discipline — let one hue dominate and use the rest sparingly. Monochromatic stays on a single hue and varies saturation and lightness, effectively a looser cousin of the shade ramp.

Sequential and diverging palettes for data visualisation

Charts need different palettes than interfaces. A sequential palette varies lightness along a single hue so that “darker means more” reads instantly in heatmaps, choropleth maps, and density plots. A diverging palette runs two sequential ramps into a neutral midpoint — the right choice when the data has a meaningful centre, like profit versus loss, or deviation above and below a target.

Generating these from your product’s brand hue keeps dashboards on-brand without hand-tuning every stop.

Contrast and WCAG accessibility ratings

Every generated shade displays its contrast ratio and a WCAG rating, so you can see at a glance which steps of the scale are safe for text. The thresholds that matter: 4.5:1 for normal body text (AA), 3:1 for large text and UI components, and 7:1 for the stricter AAA level. In a typical 50–950 scale, shades 600 and darker pass AA on white, and 50–300 work as backgrounds under dark text — but it varies by hue, which is exactly why the ratings are computed per shade rather than assumed.

Checking contrast at palette-selection time is much cheaper than retrofitting it after components ship — a palette whose “text shade” fails AA forces either a redesign or an accessibility defect.

Export formats: CSS variables, SCSS, Tailwind, and OKLCH

Palettes export as CSS custom properties (--color-500: …) for framework-free projects and design tokens, SCSS variables for Sass codebases, and a Tailwind config fragment for utility-first projects. Values can be emitted in HEX, RGB(A), HSL(A), or OKLCH.

OKLCH deserves a note: it is a perceptually uniform color space now supported in every modern browser, meaning equal numeric steps look like equal visual steps — a lightness ramp in OKLCH stays even where an HSL ramp visibly lurches — and it can express wide-gamut colors beyond sRGB. New design systems increasingly define tokens in OKLCH; the generator will hand you those values directly.

Palettes can also be saved locally in your browser and shared by URL — the full palette state is encoded in the link, so a teammate opens exactly what you built.

Common use cases

Custom Tailwind themes

Turn a brand color into a full 50–950 scale and paste the generated block straight into theme.extend.colors.

Design tokens and CSS variables

Export the same scale as CSS custom properties or SCSS variables for design-system token files.

Dashboard and chart colors

Sequential and diverging modes build heatmap and diverging-scale ramps from your brand hue.

Accessible UI states

Per-shade WCAG ratings show which steps are safe for text, borders, and interactive states before you commit.

Frequently asked questions

How many shades does the generator create?

The Shades mode generates eleven steps named 50, 100, 200 through 900, plus 950 — the same naming Tailwind CSS uses — running from a near-white tint to a near-black shade of your base color. Harmony modes (complementary, triadic, and so on) produce small sets of related hues instead.

How do I use a generated palette in Tailwind CSS?

Choose the Tailwind export and paste the generated object into theme.extend.colors in tailwind.config, under a name like brand. Utilities such as bg-brand-500, text-brand-800, and border-brand-200 become available immediately, alongside Tailwind’s built-in palettes.

Which shades should I use for text and backgrounds?

As a starting point: 50–100 for tinted backgrounds, 200–300 for borders, 400–600 for buttons and links, and 700–950 for text. Then check the per-shade WCAG ratings — body text needs 4.5:1 contrast against its background, and which shade clears that bar varies by hue.

What do the WCAG ratings on each shade mean?

They classify the shade’s contrast ratio against the thresholds in the Web Content Accessibility Guidelines: AAA means 7:1 or better, AA means at least 4.5:1 (the requirement for normal body text), and the intermediate rating marks 3:1 — enough for large text and UI components but not body copy.

What is OKLCH and why would I export in it?

OKLCH is a perceptually uniform color space supported in all modern browsers. Equal changes in its lightness value look like equal visual changes — which HSL cannot promise — so ramps stay even, and it can express wide-gamut display-P3 colors. It is becoming the preferred format for design tokens.

Can I save or share a palette?

Both. Palettes save locally in your browser so they survive the session, and the share button produces a URL that encodes the whole palette — base color, type, and format — so anyone opening the link sees exactly the palette you built. Nothing is stored on a server.

What is the difference between complementary and split-complementary?

Complementary uses the single hue directly opposite your base on the color wheel — the highest-contrast pairing available. Split-complementary replaces it with the two hues either side of that opposite point, preserving most of the contrast while reducing the visual tension, which generally makes it easier to balance.

Can I use generated palettes in commercial projects?

Yes. Colors and color combinations are not subject to copyright, and the generator places no restrictions on its output — use the palettes in client work, products, or templates freely, no attribution required.

You might also like