OKLCH Studio · Tailwind v3 → v4
Tailwind gray-50: v3 #f9fafb vs v4 oklch(0.985 0.002 247.8)
Unchangedgray-50 is effectively the same colour in v3 and v4 (ΔE-OK 0.05).
| v3 hex | #f9fafb |
|---|---|
| v3 as oklch() | oklch(0.985 0.002 247.8) |
| v4 oklch() | oklch(0.985 0.002 247.8) |
| v4 hex | #F9FAFB |
| ΔE-OK (×100) | 0.05 |
| ΔL (v4 − v3) | 0 |
| ΔC (v4 − v3) | 0 |
| ΔH (v4 − v3) | 0° |
Copy code
Tailwind v3 usage
color: #f9fafb;
// tailwind.config.js (v3)
colors.gray[50] // #f9fafbTailwind v4 @theme token
@theme {
--color-gray-50: oklch(0.985 0.002 247.8);
}
.example {
color: var(--color-gray-50);
}Keep the v3 colour in v4
@theme {
--color-gray-50: #f9fafb;
}