OKLCH Studio · Tailwind v3 → v4

Tailwind red-950: v3 #450a0a vs v4 oklch(0.258 0.092 26.0)

Unchangedred-950 is effectively the same colour in v3 and v4 (ΔE-OK 0.35).

Tailwind v3#450a0a
Tailwind v4oklch(0.258 0.092 26.0)
Tailwind red-950 values in v3 and v4
v3 hex#450a0a
v3 as oklch()oklch(0.258 0.089 26.0)
v4 oklch()oklch(0.258 0.092 26.0)
v4 hex#460809
ΔE-OK (×100)0.35
ΔL (v4 − v3)0
ΔC (v4 − v3)0.003
ΔH (v4 − v3)0°

Copy code

Tailwind v3 usage

color: #450a0a;

// tailwind.config.js (v3)
colors.red[950] // #450a0a

Tailwind v4 @theme token

@theme {
  --color-red-950: oklch(0.258 0.092 26.0);
}

.example {
  color: var(--color-red-950);
}

Keep the v3 colour in v4

@theme {
  --color-red-950: #450a0a;
}

Related

← All Tailwind v3 to v4 colors