OKLCH Studio · Tailwind v3 → v4
Tailwind gray-500: v3 #6b7280 vs v4 oklch(0.551 0.027 264.4)
Unchangedgray-500 is effectively the same colour in v3 and v4 (ΔE-OK 0.36).
| v3 hex | #6b7280 |
|---|---|
| v3 as oklch() | oklch(0.551 0.023 264.4) |
| v4 oklch() | oklch(0.551 0.027 264.4) |
| v4 hex | #6A7282 |
| ΔE-OK (×100) | 0.36 |
| ΔL (v4 − v3) | 0 |
| ΔC (v4 − v3) | 0.004 |
| ΔH (v4 − v3) | 0° |
Copy code
Tailwind v3 usage
color: #6b7280;
// tailwind.config.js (v3)
colors.gray[500] // #6b7280Tailwind v4 @theme token
@theme {
--color-gray-500: oklch(0.551 0.027 264.4);
}
.example {
color: var(--color-gray-500);
}Keep the v3 colour in v4
@theme {
--color-gray-500: #6b7280;
}