OKLCH Studio · Tailwind v3 → v4
Tailwind gray-900: v3 #111827 vs v4 oklch(0.210 0.034 264.7)
Unchangedgray-900 is effectively the same colour in v3 and v4 (ΔE-OK 0.22).
| v3 hex | #111827 |
|---|---|
| v3 as oklch() | oklch(0.210 0.032 264.7) |
| v4 oklch() | oklch(0.210 0.034 264.7) |
| v4 hex | #101828 |
| ΔE-OK (×100) | 0.22 |
| ΔL (v4 − v3) | 0 |
| ΔC (v4 − v3) | 0.002 |
| ΔH (v4 − v3) | 0° |
Copy code
Tailwind v3 usage
color: #111827;
// tailwind.config.js (v3)
colors.gray[900] // #111827Tailwind v4 @theme token
@theme {
--color-gray-900: oklch(0.210 0.034 264.7);
}
.example {
color: var(--color-gray-900);
}Keep the v3 colour in v4
@theme {
--color-gray-900: #111827;
}