OKLCH to HEX: #D1D5DB
Also known as: Tailwind v3 gray-300
Result
oklch(0.87168 0.00934 258.338) → #D1D5DB
Values are shown at full precision, so converting back gives exactly #d1d5db. 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. input
oklch(0.87168 0.00934 258.338)
2. OKLCH → Oklab
a = C·cos H = -0.00189 b = C·sin H = -0.00915
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.868958 m′ = L − 0.1056·a − 0.0639·b = 0.872463 s′ = L − 0.0895·a − 1.2915·b = 0.883662
4. cube
l = 0.868958³ = 0.656139 m = 0.872463³ = 0.664112 s = 0.883662³ = 0.690016
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.637590 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.665385 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.708379
6. linear → sRGB, × 255
R = 0.81960 × 255 = 209.00 → 209 G = 0.83529 × 255 = 213.00 → 213 B = 0.85883 × 255 = 219.00 → 219
7. RGB → HEX
#D1D5DB
All formats
- HEX
- #d1d5db
- RGB
- rgb(209 213 219)
- RGB (legacy)
- rgb(209, 213, 219)
- HSL
- hsl(216.00 12.20% 83.92%) → hsl(216 12% 84%)
- HWB
- hwb(216 82% 14%)
- OKLCH
- oklch(0.872 0.009 258.3) · oklch(87.2% 0.009 258.3)
- OKLab
- oklab(0.872 -0.002 -0.009)
- Lab (D50)
- lab(85.09 -0.57 -3.47)
- LCH (D50)
- lch(85.09 3.52 260.61)
- Display P3
- color(display-p3 0.8224 0.8348 0.8565)
- Linear sRGB
- color(srgb-linear 0.6376 0.6654 0.7084)
Gamut: sRGB and Display P3
#D1D5DB is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.063 and Display P3 reaches 0.069; this color uses 15% of the sRGB chroma available.
CSS snippets
.element {
color: #d1d5db;
color: rgb(209 213 219);
color: hsl(216 12% 84%);
color: oklch(0.872 0.009 258.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.872 0.009 258.3);
}
/* arbitrary values */
class="text-[#d1d5db] bg-[oklch(0.872_0.009_258.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.8224 0.8348 0.8565); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #d1d5db calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- gray-300#D1D5DC
- zinc-300#D4D4D8
- mist-300#D0D6D8
- neutral-300#D4D4D4
- lightgray#D3D3D3
- v3 slate-300#CBD5E1
- slate-300#CAD5E2
- stone-300#D6D3D1
Lighter and darker, same hue and chroma
- #E5E9EF · oklch(0.932 0.009 258.3) · ΔL +0.06
- #BEC2C8 · oklch(0.812 0.009 258.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?