OKLCH Studio · Tailwind v3 → v4
Tailwind gray-800: v3 #1f2937 vs v4 oklch(0.278 0.033 256.8)
Unchangedgray-800 is effectively the same colour in v3 and v4 (ΔE-OK 0.34).
| v3 hex | #1f2937 |
|---|---|
| v3 as oklch() | oklch(0.278 0.030 256.8) |
| v4 oklch() | oklch(0.278 0.033 256.8) |
| v4 hex | #1E2939 |
| ΔE-OK (×100) | 0.34 |
| ΔL (v4 − v3) | 0 |
| ΔC (v4 − v3) | 0.003 |
| ΔH (v4 − v3) | 0° |
Copy code
Tailwind v3 usage
color: #1f2937;
// tailwind.config.js (v3)
colors.gray[800] // #1f2937Tailwind v4 @theme token
@theme {
--color-gray-800: oklch(0.278 0.033 256.8);
}
.example {
color: var(--color-gray-800);
}Keep the v3 colour in v4
@theme {
--color-gray-800: #1f2937;
}