Palette Lab · Color tools

Tailwind palette generator Your brand color. A complete shade scale.

Create eleven lighter and darker shades, keep the original at a chosen step and take the same palette into Tailwind v4, v3, CSS or SCSS.

Free · No account required · Original color retained

Build a Tailwind shade scale

Keep your source color at a visible step, explore lighter and darker shades, then export one consistent set of values.

Your 50–950 scale

Eleven custom shades, not a copy of Tailwind’s default palette.

50
#f7fbff
100
#e8f1fa
200
#d2e0ef
300
#b0c5dd
400
#86a5c6
500
#5d85b0
600Original
#336699
700
#254a6e
800
#1a324b
900
#0e1c2a
950
#040609

Original color preserved at 600.

Derived shades reduce OKLCH chroma when needed to fit sRGB, keeping their target lightness and hue.

Try a real color pair

Contrast ratio: 19.45:1 · Normal text AA: Pass

Selected pair

A color story, in context.

Preview the palette on real text. Review the actual font, size and interaction states before using it.

Reversed pair

A color story, in context.

Preview the palette on real text. Review the actual font, size and interaction states before using it.

Chip labels use black or white for readability. That does not mean every pair in the palette passes WCAG. Previews and ratios use mapped sRGB.

Check this pair

Export your palette

@theme {
  --color-brand-50: oklch(98.5% 0.007310972 250.43305742);
  --color-brand-100: oklch(95.33248558% 0.0156576077 250.43305742);
  --color-brand-200: oklch(90.05329488% 0.0253095576 250.43305742);
  --color-brand-300: oklch(81.60658977% 0.0407526775 250.43305742);
  --color-brand-400: oklch(71.04820837% 0.0600565774 250.43305742);
  --color-brand-500: oklch(60.48982698% 0.0793604773 250.43305742);
  --color-brand-600: #336699;
  --color-brand-700: oklch(39.89076881% 0.0751590402 250.43305742);
  --color-brand-800: oklch(30.96572279% 0.0542654074 250.43305742);
  --color-brand-900: oklch(22.04067677% 0.0333717746 250.43305742);
  --color-brand-950: oklch(12% 0.0098664377 250.43305742);
}

Merge the theme snippet into your project. Use complete class names in source files so Tailwind can detect them. JSON is a plain color map, not a design-token specification.

Use the exact color or find a default

These are different tasks. The nearest default is optional and never replaces your source color.

Keep the exact color

bg-[#336699]

Use your custom theme

bg-brand-600

Nearest defaults

sky-700

bg-sky-700

ΔEOK · Euclidean OKLab distance: 0.038555

cyan-700

bg-cyan-700

ΔEOK · Euclidean OKLab distance: 0.052694

sky-800

bg-sky-800

ΔEOK · Euclidean OKLab distance: 0.060054

Distances compare original OKLab coordinates, not the mapped preview. A small distance is not a guarantee of an invisible difference.

Official palette source

Color calculations run in your browser. The site also loads assets, advertising and analytics.

Build a scale with clear choices

A brand color and a nearest default solve different problems.

Keep the color that makes it your brand

Automatic positioning uses the source color’s OKLCH lightness to choose a step; a fixed position lets you decide. The original value is retained at that step while the surrounding shades change. Lightness distribution and derived chroma controls refine the scale without quietly repainting your source.

Conceptual blue shade fan with a marked original color

Export a palette, not disconnected snippets

CSS variables, SCSS variables and map, Tailwind v4 @theme, v3 configuration and plain JSON all draw from the same shade data. Choose preserved originals plus OKLCH, or explicitly choose rounded sRGB HEX. The optional nearest-default panel uses versioned official palettes and shows its distance method.

Conceptual shade scale flowing into documents and light and dark interfaces

How to make a Tailwind color palette

Start with the source, then review the scale in context.

01

Enter an opaque source and choose its position

Paste a supported color, select automatic placement or a fixed 50–950 step and give the palette a valid name. Alpha is rejected rather than removed. Very light or dark colors at an extreme fixed position can produce repeated shades.

02

Adjust derived shades and compare a pair

Change lightness spacing or derived chroma while the anchor stays unchanged. Derived out-of-gamut colors reduce chroma in OKLCH. Select actual foreground and background shades in the preview and send the pair to the contrast checker.

03

Choose a version and copy useful code

Use @theme after your Tailwind v4 import, or merge the v3 theme.extend.colors object into your config. The nearest-default version selector affects matching data, not your generated scale. Keep complete utility names in source; browser support for OKLCH is separate from Tailwind version support.

Tailwind palette FAQ

Original colors, shade positions, matching and exports.

Can I keep my exact brand color in Tailwind?

Yes. Use the arbitrary-value utility shown by the tool, or define a custom theme color. The original/CSS export preserves the source at its anchor. Choosing HEX may introduce sRGB mapping or 8-bit rounding; matching a built-in color is an optional approximation.

Where do Tailwind v4 and v3 exports go?

Put the v4 @theme snippet in your stylesheet after @import "tailwindcss". For v3, merge theme.extend.colors into your configuration; the download uses an ES-module .mjs file. Copy the complete classes into scanned source files. Existing project setup is still required.

Why is my original color at 600 instead of 500?

Automatic placement picks the reference step closest to its OKLCH lightness. The source is not changed to fit 500. You can choose a fixed step and the tool rebuilds surrounding shades while preserving the source value.

Is the generated scale an official Tailwind palette?

No. It is a custom scale generated from your color. Only the nearest-default panel uses the official snapshots, labeled Tailwind CSS 4.3.3 or 3.4.17. Generated shades are not claimed to reproduce Tailwind’s palette design process.

How is the nearest Tailwind color chosen?

The tool compares Euclidean distance in OKLab (ΔEOK) across the selected official palette and shows three nearest candidates. Alpha is not accepted. Distances use original coordinates while previews are mapped to sRGB, so the score is not a promise about an actual display.

Do I have to convert HEX to OKLCH for Tailwind v4?

No. Tailwind theme colors can use HEX and other supported CSS colors. OKLCH is useful here for generating lightness and chroma changes. Preserve the original/CSS values, or choose HEX deliberately when you want an sRGB output.

Why do some shades have less chroma or repeat?

Derived colors reduce chroma to fit sRGB while retaining target lightness and hue. The original is kept even when outside sRGB, with a preview warning. Near black or white, especially with a forced extreme anchor, there may be insufficient lightness range for distinct steps.

Does a complete scale guarantee accessible UI colors?

No. Shade numbers and color harmony do not establish contrast. Choose the actual text/background pair and check the ratio, then assess font size, states and context. The preview’s chip label contrast does not certify the whole palette.

Technical references: CSS Color 4 · Color.js · OKLab · Tailwind v4 · Tailwind v3

Give your color a useful range

Preserve the original, then build the shades around it.

Generated palettes are design starting points; review the actual color pairs in your interface.