HEX to RGB: #D1D5DB
Also known as: Tailwind v3 gray-300
Result
#D1D5DB → rgb(209 213 219)
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. HEX → pairs
#D1D5DB → D1 | D5 | DB
2. base 16 → base 10
R = D1₁₆ = 13×16 + 1 = 209 G = D5₁₆ = 13×16 + 5 = 213 B = DB₁₆ = 13×16 + 11 = 219
3. RGB
rgb(209 213 219)
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?