OKLCH Studio · Tailwind v3 → v4

Tailwind fuchsia-500: v3 #d946ef vs v4 oklch(0.667 0.295 322.1)

ChangedIn v4, fuchsia-500 is more saturated than in v3 (ΔL 0.000, ΔC +0.036, ΔH 0.0°).

Tailwind v3#d946ef
Tailwind v4oklch(0.667 0.295 322.1)
Tailwind fuchsia-500 values in v3 and v4
v3 hex#d946ef
v3 as oklch()oklch(0.667 0.259 322.1)
v4 oklch()oklch(0.667 0.295 322.1)
v4 hex#E12AFB
ΔE-OK (×100)3.59
ΔL (v4 − v3)0
ΔC (v4 − v3)0.036
ΔH (v4 − v3)0°

Copy code

Tailwind v3 usage

color: #d946ef;

// tailwind.config.js (v3)
colors.fuchsia[500] // #d946ef

Tailwind v4 @theme token

@theme {
  --color-fuchsia-500: oklch(0.667 0.295 322.1);
}

.example {
  color: var(--color-fuchsia-500);
}

Keep the v3 colour in v4

@theme {
  --color-fuchsia-500: #d946ef;
}

Related

← All Tailwind v3 to v4 colors