HEX to OKLCH: #6B7280

Also known as: Tailwind v3 gray-500

Result

#6B7280 → oklch(0.551 0.023 264.4)

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. sRGB → linear

    R: 107/255 = 0.41961 → 0.147027  (((x + 0.055) / 1.055)^2.4)
    G: 114/255 = 0.44706 → 0.168269  (((x + 0.055) / 1.055)^2.4)
    B: 128/255 = 0.50196 → 0.215861  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.161961
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.168879
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.196375
  3. 3. cube root

    l′ = ∛0.161961 = 0.545093
    m′ = ∛0.168879 = 0.552746
    s′ = ∛0.196375 = 0.581249
  4. 4. LMS′ → Oklab

    L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.55102
    a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.00229
    b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.02325
  5. 5. Oklab → OKLCH

    C = √(a² + b²) = 0.02336
    H = atan2(b, a) = 264.364°
    L = 0.55102
  6. 6. OKLCH

    oklch(0.55102 0.02336 264.364)
    rounded: oklch(0.551 0.023 264.4)

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?