HEX to HSL: #D1D5DC
Also known as: Tailwind gray-300
Result
#D1D5DC → hsl(218 14% 84%)
Values are shown at full precision, so converting back gives exactly #d1d5dc. 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.8627
2. max, min, Δ
max = 0.8627 min = 0.8196 Δ = max − min = 0.0431
3. L
L = (max + min) / 2 = 0.8412 = 84.12%
4. S
S = Δ / (1 − |2L − 1|) = 0.1358 = 13.58%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.8196 − 0.8353) / 0.0431 + 4) = 218.18°
6. HSL
hsl(218.18 13.58% 84.12%)
All formats
- HEX
- #d1d5dc
- RGB
- rgb(209 213 220)
- RGB (legacy)
- rgb(209, 213, 220)
- HSL
- hsl(218.18 13.58% 84.12%) → hsl(218 14% 84%)
- HWB
- hwb(218 82% 14%)
- OKLCH
- oklch(0.872 0.011 261.8) · oklch(87.2% 0.011 261.8)
- OKLab
- oklab(0.872 -0.002 -0.010)
- Lab (D50)
- lab(85.11 -0.43 -3.96)
- LCH (D50)
- lch(85.11 3.99 263.77)
- Display P3
- color(display-p3 0.8224 0.8348 0.8601)
- Linear sRGB
- color(srgb-linear 0.6376 0.6654 0.7157)
Gamut: sRGB and Display P3
#D1D5DC 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 17% of the sRGB chroma available.
CSS snippets
.element {
color: #d1d5dc;
color: rgb(209 213 220);
color: hsl(218 14% 84%);
color: oklch(0.872 0.011 261.8);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.872 0.011 261.8);
}
/* arbitrary values */
class="text-[#d1d5dc] bg-[oklch(0.872_0.011_261.8)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.8224 0.8348 0.8601); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #d1d5dc calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 gray-300#D1D5DB
- zinc-300#D4D4D8
- mist-300#D0D6D8
- v3 slate-300#CBD5E1
- neutral-300#D4D4D4
- lightgray#D3D3D3
- slate-300#CAD5E2
- mauve-300#D7D0D7
Lighter and darker, same hue and chroma
- #E5E9F0 · oklch(0.932 0.011 261.8) · ΔL +0.06
- #BEC2C9 · oklch(0.812 0.011 261.8) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?