HEX to OKLCH: #D4D4D8
Also known as: Tailwind zinc-300, Tailwind v3 zinc-300
Result
#D4D4D8 → oklch(0.871 0.005 286.3)
Values are shown at full precision, so converting back gives exactly #d4d4d8. The rounded form is what you normally paste into CSS.
Step-by-step math
Every number below is computed from the input, nothing is looked up.
1. sRGB → linear
R: 212/255 = 0.83137 → 0.658375 (((x + 0.055) / 1.055)^2.4) G: 212/255 = 0.83137 → 0.658375 (((x + 0.055) / 1.055)^2.4) B: 216/255 = 0.84706 → 0.686685 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.659831 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.661415 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.676210
3. cube root
l′ = ∛0.659831 = 0.870585 m′ = ∛0.661415 = 0.871281 s′ = ∛0.676210 = 0.877729
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.87111 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.00153 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.00523
5. Oklab → OKLCH
C = √(a² + b²) = 0.00545 H = atan2(b, a) = 286.286° L = 0.87111
6. OKLCH
oklch(0.87111 0.00545 286.286) rounded: oklch(0.871 0.005 286.3)
All formats
- HEX
- #d4d4d8
- RGB
- rgb(212 212 216)
- RGB (legacy)
- rgb(212, 212, 216)
- HSL
- hsl(240.00 4.88% 83.92%) → hsl(240 5% 84%)
- HWB
- hwb(240 83% 15%)
- OKLCH
- oklch(0.871 0.005 286.3) · oklch(87.1% 0.005 286.3)
- OKLab
- oklab(0.871 0.002 -0.005)
- Lab (D50)
- lab(85.00 0.55 -1.98)
- LCH (D50)
- lch(85.00 2.05 285.40)
- Display P3
- color(display-p3 0.8314 0.8314 0.8457)
- Linear sRGB
- color(srgb-linear 0.6584 0.6584 0.6867)
Gamut: sRGB and Display P3
#D4D4D8 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.066 and Display P3 reaches 0.073; this color uses 8% of the sRGB chroma available.
CSS snippets
.element {
color: #d4d4d8;
color: rgb(212 212 216);
color: hsl(240 5% 84%);
color: oklch(0.871 0.005 286.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.871 0.005 286.3);
}
/* arbitrary values */
class="text-[#d4d4d8] bg-[oklch(0.871_0.005_286.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.8314 0.8314 0.8457); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #d4d4d8 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 gray-300#D1D5DB
- neutral-300#D4D4D4
- gray-300#D1D5DC
- lightgray#D3D3D3
- mist-300#D0D6D8
- stone-300#D6D3D1
- mauve-300#D7D0D7
- taupe-300#D8D2D0
Lighter and darker, same hue and chroma
- #E8E8EC · oklch(0.931 0.005 286.3) · ΔL +0.06
- #C1C1C5 · oklch(0.811 0.005 286.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?