OKLCH Studio · Tailwind v3 → v4
Tailwind blue-900: v3 #1e3a8a vs v4 oklch(0.379 0.146 265.5)
Subtle shiftIn v4, blue-900 is more saturated than in v3 (ΔL 0.000, ΔC +0.008, ΔH 0.0°).
| v3 hex | #1e3a8a |
|---|---|
| v3 as oklch() | oklch(0.379 0.138 265.5) |
| v4 oklch() | oklch(0.379 0.146 265.5) |
| v4 hex | #1C398E |
| ΔE-OK (×100) | 0.82 |
| ΔL (v4 − v3) | 0 |
| ΔC (v4 − v3) | 0.008 |
| ΔH (v4 − v3) | 0° |
Copy code
Tailwind v3 usage
color: #1e3a8a;
// tailwind.config.js (v3)
colors.blue[900] // #1e3a8aTailwind v4 @theme token
@theme {
--color-blue-900: oklch(0.379 0.146 265.5);
}
.example {
color: var(--color-blue-900);
}Keep the v3 colour in v4
@theme {
--color-blue-900: #1e3a8a;
}