OKLCH Studio · Tailwind v3 → v4

Tailwind green-500: v3 #22c55e vs v4 oklch(0.723 0.219 149.6)

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

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

Tailwind v3#22c55e
Tailwind v4oklch(0.723 0.219 149.6)
Tailwind green-500 values in v3 and v4
v3 hex#22c55e
v3 as oklch()oklch(0.723 0.192 149.6)
v4 oklch()oklch(0.723 0.219 149.6)
v4 hex#00C950
ΔE-OK (×100)2.70
ΔL (v4 − v3)0
ΔC (v4 − v3)0.027
ΔH (v4 − v3)0°

Copy code

Tailwind v3 usage

color: #22c55e;

// tailwind.config.js (v3)
colors.green[500] // #22c55e

Tailwind v4 @theme token

@theme {
  --color-green-500: oklch(0.723 0.219 149.6);
}

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

Keep the v3 colour in v4

@theme {
  --color-green-500: #22c55e;
}

Related

← All Tailwind v3 to v4 colors