OKLCH Studio · Tailwind v3 → v4

Tailwind red-100: v3 #fee2e2 vs v4 oklch(0.936 0.032 17.7)

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

Tailwind v3#fee2e2
Tailwind v4oklch(0.936 0.032 17.7)
Tailwind red-100 values in v3 and v4
v3 hex#fee2e2
v3 as oklch()oklch(0.936 0.031 17.7)
v4 oklch()oklch(0.936 0.032 17.7)
v4 hex#FFE2E2
ΔE-OK (×100)0.12
ΔL (v4 − v3)0
ΔC (v4 − v3)0.001
ΔH (v4 − v3)0°

Copy code

Tailwind v3 usage

color: #fee2e2;

// tailwind.config.js (v3)
colors.red[100] // #fee2e2

Tailwind v4 @theme token

@theme {
  --color-red-100: oklch(0.936 0.032 17.7);
}

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

Keep the v3 colour in v4

@theme {
  --color-red-100: #fee2e2;
}

Related

← All Tailwind v3 to v4 colors