HSL to HEX: #374151

Also known as: Tailwind v3 gray-700

Result

hsl(216.92 19.12% 26.67%) → #374151

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. 1. input

    H = 216.92°, S = 19.12%, L = 26.67%
  2. 2. C

    C = (1 − |2L − 1|) × S = 0.10199
  3. 3. X

    X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.03923   (H / 60° = 3.6153, sector 3)
  4. 4. m

    m = L − C / 2 = 0.21571
  5. 5. (R′, G′, B′) + m

    (R′, G′, B′) = (0.00000, 0.03923, 0.10199)
    R = round((0.00000 + 0.21571) × 255) = 55
    G = round((0.03923 + 0.21571) × 255) = 65
    B = round((0.10199 + 0.21571) × 255) = 81
  6. 6. RGB → HEX

    #374151

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).

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

All converters →

Guides: What is OKLCH?