OKLCH Studio · Tailwind v3 → v4

Tailwind yellow-300: v3 #fde047 vs v4 oklch(0.905 0.182 98.1)

Subtle shiftIn v4, yellow-300 is more saturated than in v3 (ΔL 0.000, ΔC +0.016, ΔH 0.0°).

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

Tailwind v3#fde047
Tailwind v4oklch(0.905 0.182 98.1)
Tailwind yellow-300 values in v3 and v4
v3 hex#fde047
v3 as oklch()oklch(0.905 0.166 98.1)
v4 oklch()oklch(0.905 0.182 98.1)
v4 hex#FFDF20
ΔE-OK (×100)1.63
ΔL (v4 − v3)0
ΔC (v4 − v3)0.016
ΔH (v4 − v3)0°

Copy code

Tailwind v3 usage

color: #fde047;

// tailwind.config.js (v3)
colors.yellow[300] // #fde047

Tailwind v4 @theme token

@theme {
  --color-yellow-300: oklch(0.905 0.182 98.1);
}

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

Keep the v3 colour in v4

@theme {
  --color-yellow-300: #fde047;
}

Related

← All Tailwind v3 to v4 colors