Why Tailwind v4 moved its colors to OKLCH

Tailwind v4 rewrote its default palette in OKLCH. Here is how the numbers changed from v3 hex, step by step, and what it means for brand colors.

Tailwind moved the default palette to OKLCH to get more vivid colors on screens that can show more than sRGB. That is the reason Tailwind gives in the v4.0 announcement of January 22, 2025 (Tailwind v4.0 post).

I converted the v3 hex values and compared them with the v4 numbers, using the red scale. The changes are small, and they only show on some screens.

What did Tailwind change about its colors?

It rewrote the whole default palette from rgb to oklch. Tailwind says it tried to keep the balance between colors the same as in v3, so upgrading should not feel like a breaking change (Tailwind v4.0 post).

The palette keeps its shape. Each color has 11 steps, with 50 the lightest and 950 the darkest (Tailwind colors docs, as of October 2026).

How different are the numbers?

Chroma went up in ten of the eleven red steps, by 4% to 15%. Lightness and hue stayed close. Here is red, v3 against v4. The v3 hex values are from the v3 docs, the v4 values from the v4 docs, and I did the conversion with node.

Step v3 hex v3 as OKLCH v4 OKLCH Chroma change Inside sRGB?
50 #fef2f2 97.1% 0.013 17.4 97.1% 0.013 17.38 0% yes
100 #fee2e2 93.6% 0.031 17.7 93.6% 0.032 17.717 4% yes
200 #fecaca 88.5% 0.059 18.3 88.5% 0.062 18.334 5% no
300 #fca5a5 80.8% 0.103 19.6 80.8% 0.114 19.571 10% no
400 #f87171 71.1% 0.166 22.2 70.4% 0.191 22.216 15% no
500 #ef4444 63.7% 0.208 25.3 63.7% 0.237 25.331 14% yes
600 #dc2626 57.7% 0.215 27.3 57.7% 0.245 27.325 14% no
700 #b91c1c 50.5% 0.190 27.5 50.5% 0.213 27.518 12% no
800 #991b1b 44.4% 0.161 26.9 44.4% 0.177 26.899 10% yes
900 #7f1d1d 39.6% 0.133 25.7 39.6% 0.141 25.723 6% yes
950 #450a0a 25.8% 0.089 26.0 25.8% 0.092 26.042 4% yes

Lightness matches in ten steps. Red-400 is 0.7 points darker in v4. The v3 side is hex, so 8-bit rounding adds noise. Trust the big changes in the middle of the scale more than the 0% to 5% changes at the ends.

Do the new colors look different on my screen?

Only if the screen can show colors outside sRGB. Five of the eleven red steps (200, 300, 400, 600 and 700) sit outside sRGB by my calculation. "Outside" here means a converted red, green or blue channel falls below 0 or above 1.

The CSS Color 4 draft says a color like that is valid but gets gamut mapped for display, giving a similar color with lower chroma (W3C CSS Color 4). On an sRGB-only screen you see the mapped version of those steps. I did not test how each browser does the mapping.

Did contrast change?

Barely. White text on red-500 is about 3.8:1 in both versions, so it passes for large text (3:1) and fails for normal text (4.5:1). Those thresholds are in WCAG 2.2 criterion 1.4.3.

Step v3 white text v4 white text (sRGB hex)
red-500 3.76:1 3.81:1
red-600 4.83:1 4.77:1
red-700 6.47:1 6.42:1

I computed these with the WCAG relative luminance formula. For v4 I converted each OKLCH value to sRGB and clipped it, giving #fb2c36, #e7000b and #c10007. A wide-gamut screen shows slightly different colors, so treat the v4 column as approximate.

What does it mean for my brand colors?

Hex still works. You can keep it in @theme, and Tailwind's own docs mix both forms:

@import "tailwindcss";

@theme {
  --color-midnight: #121063;
  --color-mint-500: oklch(0.72 0.11 178);
}

Both lines come from Tailwind's colors and theme docs. Every theme variable becomes a normal CSS variable, and by default only the ones you use end up in the output.

Writing your brand color in OKLCH changes the numbers you edit. It does not change the color. To get more vivid colors you have to choose chroma beyond sRGB yourself, and only wide-gamut screens will show it.

One more thing to check: v4.0 is designed for Safari 16.4+, Chrome 111+ and Firefox 128+. Tailwind says to stay on v3.4 if you need older browsers (Tailwind upgrade guide, as of October 2026). The browser side of OKLCH is covered in Is OKLCH safe to use in production CSS.

Where does UIX fit?

If you are happy with Tailwind's default colors, you do not need anything else. If you want a scale built from your own brand color, UIX Design System makes 11-step OKLCH scales and can name them 50 to 950. The Tailwind v4 @theme export is free (code export).

The free web generator at /generate shows the same scales for any hex without opening Figma.

FAQ

Did Tailwind v4 change the default colors a lot?

The steps and names are the same, and Tailwind says it kept the balance between colors. In the red scale I compared, chroma rose by 4% to 15% in ten of eleven steps.

Do I have to write OKLCH in Tailwind v4?

No. Tailwind's docs show custom colors written as hex inside @theme, next to the OKLCH defaults.

How do I override one default color in v4?

Redefine the theme variable with the same name. Tailwind's docs show --color-gray-500 being replaced inside @theme.

Does v4 still read tailwind.config.js?

Not automatically. The upgrade guide says JavaScript config files are still supported but are no longer detected, and you can load one with the @config directive.

Keep reading

Try it on your own brand color. UIX is free to start in any Figma file, and Pro adds more when you need it.