OKLCH Studio · Tailwind v3 → v4

Tailwind yellow-500: v3 #eab308 vs v4 oklch(0.795 0.184 86.0)

ChangedIn v4, yellow-500 is more saturated than in v3 (ΔL 0.000, ΔC +0.022, ΔH 0.0°).

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

Tailwind v3#eab308
Tailwind v4oklch(0.795 0.184 86.0)
Tailwind yellow-500 values in v3 and v4
v3 hex#eab308
v3 as oklch()oklch(0.795 0.162 86.0)
v4 oklch()oklch(0.795 0.184 86.0)
v4 hex#F0B100
ΔE-OK (×100)2.23
ΔL (v4 − v3)0
ΔC (v4 − v3)0.022
ΔH (v4 − v3)0°

Copy code

Tailwind v3 usage

color: #eab308;

// tailwind.config.js (v3)
colors.yellow[500] // #eab308

Tailwind v4 @theme token

@theme {
  --color-yellow-500: oklch(0.795 0.184 86.0);
}

.example {
  color: var(--color-yellow-500);
}

Keep the v3 colour in v4

@theme {
  --color-yellow-500: #eab308;
}

Related

← All Tailwind v3 to v4 colors