OKLCH to HEX: #9F0712

Also known as: Tailwind red-800

Result

oklch(0.44459 0.17737 26.787) → #9F0712

Values are shown at full precision, so converting back gives exactly #9f0712. 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

    oklch(0.44459 0.17737 26.787)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.15834
    b = C·sin H = 0.07994
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.524595
    m′ = L − 0.1056·a − 0.0639·b = 0.422772
    s′ = L − 0.0895·a − 1.2915·b = 0.327185
  4. 4. cube

    l = 0.524595³ = 0.144369
    m = 0.422772³ = 0.075564
    s = 0.327185³ = 0.035025
  5. 5. LMS → linear sRGB

    R = 4.0767·l − 3.3077·m + 0.2310·s = 0.346698
    G = −1.2684·l + 2.6098·m − 0.3413·s = 0.002127
    B = −0.0042·l − 0.7034·m + 1.7076·s = 0.006050
  6. 6. linear → sRGB, × 255

    R = 0.62352 × 255 = 159.00 → 159
    G = 0.02749 × 255 = 7.01 → 7
    B = 0.07060 × 255 = 18.00 → 18
  7. 7. RGB → HEX

    #9F0712

All formats

HEX
#9f0712
RGB
rgb(159 7 18)
RGB (legacy)
rgb(159, 7, 18)
HSL
hsl(355.66 91.57% 32.55%) → hsl(356 92% 33%)
HWB
hwb(356 3% 38%)
OKLCH
oklch(0.445 0.177 26.8) · oklch(44.5% 0.177 26.8)
OKLab
oklab(0.445 0.158 0.080)
Lab (D50)
lab(33.78 56.04 40.90)
LCH (D50)
lch(33.78 69.38 36.12)
Display P3
color(display-p3 0.5708 0.1208 0.1096)
Linear sRGB
color(srgb-linear 0.3467 0.0021 0.0060)

Gamut: sRGB and Display P3

#9F0712 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.181 and Display P3 reaches 0.204; this color uses 98% of the sRGB chroma available.

CSS snippets

.element {
  color: #9f0712;
  color: rgb(159 7 18);
  color: hsl(356 92% 33%);
  color: oklch(0.445 0.177 26.8);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.445 0.177 26.8);
}
/* arbitrary values */
class="text-[#9f0712] bg-[oklch(0.445_0.177_26.8)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.5708 0.1208 0.1096); }
}

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

  • #B42726 · oklch(0.505 0.177 26.8) · ΔL +0.06
  • #8A0000 · oklch(0.385 0.177 26.8) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?