OKLCH Studio · Tailwind v3 → v4

Tailwind neutral-400: v3 #a3a3a3 vs v4 oklch(0.708 0.000 0.0)

Subtle shiftIn v4, neutral-400 is darker than in v3 (ΔL -0.007, ΔC 0.000, ΔH 0.0°).

Tailwind v3#a3a3a3
Tailwind v4oklch(0.708 0.000 0.0)
Tailwind neutral-400 values in v3 and v4
v3 hex#a3a3a3
v3 as oklch()oklch(0.715 0.000 0.0)
v4 oklch()oklch(0.708 0.000 0.0)
v4 hex#A1A1A1
ΔE-OK (×100)0.75
ΔL (v4 − v3)-0.007
ΔC (v4 − v3)0
ΔH (v4 − v3)0°

Copy code

Tailwind v3 usage

color: #a3a3a3;

// tailwind.config.js (v3)
colors.neutral[400] // #a3a3a3

Tailwind v4 @theme token

@theme {
  --color-neutral-400: oklch(0.708 0.000 0.0);
}

.example {
  color: var(--color-neutral-400);
}

Keep the v3 colour in v4

@theme {
  --color-neutral-400: #a3a3a3;
}

Related

← All Tailwind v3 to v4 colors