OKLCH Studio · Tailwind v3 → v4

Tailwind red-400: v3 #f87171 vs v4 oklch(0.704 0.191 22.2)

ChangedIn v4, red-400 is darker and more saturated than in v3 (ΔL -0.007, ΔC +0.025, ΔH 0.0°).

The v4 value is outside the sRGB gamut, so #FF6467 is a clipped sRGB approximation; wide-gamut displays can show it more vivid.

Tailwind v3#f87171
Tailwind v4oklch(0.704 0.191 22.2)
Tailwind red-400 values in v3 and v4
v3 hex#f87171
v3 as oklch()oklch(0.711 0.166 22.2)
v4 oklch()oklch(0.704 0.191 22.2)
v4 hex#FF6467
ΔE-OK (×100)2.57
ΔL (v4 − v3)-0.007
ΔC (v4 − v3)0.025
ΔH (v4 − v3)0°

Copy code

Tailwind v3 usage

color: #f87171;

// tailwind.config.js (v3)
colors.red[400] // #f87171

Tailwind v4 @theme token

@theme {
  --color-red-400: oklch(0.704 0.191 22.2);
}

.example {
  color: var(--color-red-400);
}

Keep the v3 colour in v4

@theme {
  --color-red-400: #f87171;
}

Related

← All Tailwind v3 to v4 colors