HEX to OKLCH: #500724

Also known as: Tailwind v3 pink-950

Result

#500724 → oklch(0.284 0.105 3.9)

Values are shown at full precision, so converting back gives exactly #500724. 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: 80/255 = 0.31373 → 0.080220  (((x + 0.055) / 1.055)^2.4)
    G: 7/255 = 0.02745 → 0.002125  (÷ 12.92)
    B: 36/255 = 0.14118 → 0.017642  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.035115
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.020340
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.018796
  3. 3. cube root

    l′ = ∛0.035115 = 0.327466
    m′ = ∛0.020340 = 0.272971
    s′ = ∛0.018796 = 0.265883
  4. 4. LMS′ → Oklab

    L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.28447
    a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.10460
    b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.00714
  5. 5. Oklab → OKLCH

    C = √(a² + b²) = 0.10484
    H = atan2(b, a) = 3.907°
    L = 0.28447
  6. 6. OKLCH

    oklch(0.28447 0.10484 3.907)
    rounded: oklch(0.284 0.105 3.9)

All formats

HEX
#500724
RGB
rgb(80 7 36)
RGB (legacy)
rgb(80, 7, 36)
HSL
hsl(336.16 83.91% 17.06%) → hsl(336 84% 17%)
HWB
hwb(336 3% 69%)
OKLCH
oklch(0.284 0.105 3.9) · oklch(28.4% 0.105 3.9)
OKLab
oklab(0.284 0.105 0.007)
Lab (D50)
lab(15.72 33.92 3.39)
LCH (D50)
lch(15.72 34.09 5.70)
Display P3
color(display-p3 0.2857 0.0582 0.1409)
Linear sRGB
color(srgb-linear 0.0802 0.0021 0.0176)

Gamut: sRGB and Display P3

#500724 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.114 and Display P3 reaches 0.129; this color uses 92% of the sRGB chroma available.

CSS snippets

.element {
  color: #500724;
  color: rgb(80 7 36);
  color: hsl(336 84% 17%);
  color: oklch(0.284 0.105 3.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.284 0.105 3.9);
}
/* arbitrary values */
class="text-[#500724] bg-[oklch(0.284_0.105_3.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.2857 0.0582 0.1409); }
}

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

  • #621B33 · oklch(0.344 0.105 3.9) · ΔL +0.06
  • #3E0016 · oklch(0.224 0.105 3.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?