HEX to HSL: #D1D5DB
Also known as: Tailwind v3 gray-300
Result
#D1D5DB → hsl(216 12% 84%)
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. RGB ÷ 255
R = 0.8196 G = 0.8353 B = 0.8588
2. max, min, Δ
max = 0.8588 min = 0.8196 Δ = max − min = 0.0392
3. L
L = (max + min) / 2 = 0.8392 = 83.92%
4. S
S = Δ / (1 − |2L − 1|) = 0.1220 = 12.20%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.8196 − 0.8353) / 0.0392 + 4) = 216.00°
6. HSL
hsl(216.00 12.20% 83.92%)
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?