OKLCH Studio · Tailwind v3 → v4

Tailwind purple-200: v3 #e9d5ff vs v4 oklch(0.902 0.063 306.7)

Unchangedpurple-200 is effectively the same colour in v3 and v4 (ΔE-OK 0.26).

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

Tailwind v3#e9d5ff
Tailwind v4oklch(0.902 0.063 306.7)
Tailwind purple-200 values in v3 and v4
v3 hex#e9d5ff
v3 as oklch()oklch(0.902 0.060 306.7)
v4 oklch()oklch(0.902 0.063 306.7)
v4 hex#E9D4FF
ΔE-OK (×100)0.26
ΔL (v4 − v3)0
ΔC (v4 − v3)0.003
ΔH (v4 − v3)0°

Copy code

Tailwind v3 usage

color: #e9d5ff;

// tailwind.config.js (v3)
colors.purple[200] // #e9d5ff

Tailwind v4 @theme token

@theme {
  --color-purple-200: oklch(0.902 0.063 306.7);
}

.example {
  color: var(--color-purple-200);
}

Keep the v3 colour in v4

@theme {
  --color-purple-200: #e9d5ff;
}

Related

← All Tailwind v3 to v4 colors