RGB to HEX: #6B7280

Also known as: Tailwind v3 gray-500

Result

rgb(107 114 128) → #6B7280

Values are shown at full precision, so converting back gives exactly #6b7280. 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 = 107 = 6×16 + 11 → 6B
    G = 114 = 7×16 + 2 → 72
    B = 128 = 8×16 + 0 → 80
  2. 2. pairs → HEX

    6B 72 80 → #6B7280

All formats

HEX
#6b7280
RGB
rgb(107 114 128)
RGB (legacy)
rgb(107, 114, 128)
HSL
hsl(220.00 8.94% 46.08%) → hsl(220 9% 46%)
HWB
hwb(220 42% 50%)
OKLCH
oklch(0.551 0.023 264.4) · oklch(55.1% 0.023 264.4)
OKLab
oklab(0.551 -0.002 -0.023)
Lab (D50)
lab(47.81 -0.39 -8.70)
LCH (D50)
lch(47.81 8.71 267.45)
Display P3
color(display-p3 0.4246 0.4462 0.4970)
Linear sRGB
color(srgb-linear 0.1470 0.1683 0.2159)

Gamut: sRGB and Display P3

#6B7280 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.248 and Display P3 reaches 0.265; this color uses 9% of the sRGB chroma available.

CSS snippets

.element {
  color: #6b7280;
  color: rgb(107 114 128);
  color: hsl(220 9% 46%);
  color: oklch(0.551 0.023 264.4);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.551 0.023 264.4);
}
/* arbitrary values */
class="text-[#6b7280] bg-[oklch(0.551_0.023_264.4)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.4246 0.4462 0.4970); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #6b7280 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

  • #7C8492 · oklch(0.611 0.023 264.4) · ΔL +0.06
  • #5A616E · oklch(0.491 0.023 264.4) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?