OKLCH Studio · Tailwind v3 → v4
Tailwind gray-400: v3 #9ca3af vs v4 oklch(0.707 0.022 261.3)
Subtle shiftIn v4, gray-400 is darker than in v3 (ΔL -0.007, ΔC +0.003, ΔH 0.0°).
| v3 hex | #9ca3af |
|---|---|
| v3 as oklch() | oklch(0.714 0.019 261.3) |
| v4 oklch() | oklch(0.707 0.022 261.3) |
| v4 hex | #99A1AF |
| ΔE-OK (×100) | 0.72 |
| ΔL (v4 − v3) | -0.007 |
| ΔC (v4 − v3) | 0.003 |
| ΔH (v4 − v3) | 0° |
Copy code
Tailwind v3 usage
color: #9ca3af;
// tailwind.config.js (v3)
colors.gray[400] // #9ca3afTailwind v4 @theme token
@theme {
--color-gray-400: oklch(0.707 0.022 261.3);
}
.example {
color: var(--color-gray-400);
}Keep the v3 colour in v4
@theme {
--color-gray-400: #9ca3af;
}