HEX to HSL: #374151
Also known as: Tailwind v3 gray-700
Result
#374151 → hsl(217 19% 27%)
Values are shown at full precision, so converting back gives exactly #374151. 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.2157 G = 0.2549 B = 0.3176
2. max, min, Δ
max = 0.3176 min = 0.2157 Δ = max − min = 0.1020
3. L
L = (max + min) / 2 = 0.2667 = 26.67%
4. S
S = Δ / (1 − |2L − 1|) = 0.1912 = 19.12%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.2157 − 0.2549) / 0.1020 + 4) = 216.92°
6. HSL
hsl(216.92 19.12% 26.67%)
All formats
- HEX
- #374151
- RGB
- rgb(55 65 81)
- RGB (legacy)
- rgb(55, 65, 81)
- HSL
- hsl(216.92 19.12% 26.67%) → hsl(217 19% 27%)
- HWB
- hwb(217 22% 68%)
- OKLCH
- oklch(0.373 0.031 259.7) · oklch(37.3% 0.031 259.7)
- OKLab
- oklab(0.373 -0.005 -0.030)
- Lab (D50)
- lab(27.13 -0.95 -11.13)
- LCH (D50)
- lch(27.13 11.17 265.11)
- Display P3
- color(display-p3 0.2232 0.2537 0.3122)
- Linear sRGB
- color(srgb-linear 0.0382 0.0529 0.0823)
Gamut: sRGB and Display P3
#374151 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.150 and Display P3 reaches 0.189; this color uses 20% of the sRGB chroma available.
CSS snippets
.element {
color: #374151;
color: rgb(55 65 81);
color: hsl(217 19% 27%);
color: oklch(0.373 0.031 259.7);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.373 0.031 259.7);
}
/* arbitrary values */
class="text-[#374151] bg-[oklch(0.373_0.031_259.7)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2232 0.2537 0.3122); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #374151 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- gray-700#364153
- v3 slate-700#334155
- slate-700#314158
- zinc-700#3F3F46
- mist-700#394447
- neutral-700#404040
- mauve-700#463947
- v3 stone-700#44403C
Lighter and darker, same hue and chroma
- #475162 · oklch(0.433 0.031 259.7) · ΔL +0.06
- #283141 · oklch(0.313 0.031 259.7) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?