OKLCH Studio · Tailwind v3 → v4

Tailwind violet-200: v3 #ddd6fe vs v4 oklch(0.894 0.057 293.3)

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

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

Tailwind v3#ddd6fe
Tailwind v4oklch(0.894 0.057 293.3)
Tailwind violet-200 values in v3 and v4
v3 hex#ddd6fe
v3 as oklch()oklch(0.894 0.055 293.3)
v4 oklch()oklch(0.894 0.057 293.3)
v4 hex#DDD6FF
ΔE-OK (×100)0.21
ΔL (v4 − v3)0
ΔC (v4 − v3)0.002
ΔH (v4 − v3)0°

Copy code

Tailwind v3 usage

color: #ddd6fe;

// tailwind.config.js (v3)
colors.violet[200] // #ddd6fe

Tailwind v4 @theme token

@theme {
  --color-violet-200: oklch(0.894 0.057 293.3);
}

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

Keep the v3 colour in v4

@theme {
  --color-violet-200: #ddd6fe;
}

Related

← All Tailwind v3 to v4 colors