RGB to HEX: #374151

Also known as: Tailwind v3 gray-700

Result

rgb(55 65 81) → #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. base 10 → base 16

    R = 55 = 3×16 + 7 → 37
    G = 65 = 4×16 + 1 → 41
    B = 81 = 5×16 + 1 → 51
  2. 2. pairs → HEX

    37 41 51 → #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?