OKLCH to HEX: #4C0519

Also known as: Tailwind v3 rose-950

Result

oklch(0.27085 0.10086 12.094) → #4C0519

Values are shown at full precision, so converting back gives exactly #4c0519. 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.27085 0.10086 12.094)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.09862
    b = C·sin H = 0.02113
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.314498
    m′ = L − 0.1056·a − 0.0639·b = 0.259090
    s′ = L − 0.0895·a − 1.2915·b = 0.234734
  4. 4. cube

    l = 0.314498³ = 0.031107
    m = 0.259090³ = 0.017392
    s = 0.234734³ = 0.012934
  5. 5. LMS → linear sRGB

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

    R = 0.29804 × 255 = 76.00 → 76
    G = 0.01961 × 255 = 5.00 → 5
    B = 0.09804 × 255 = 25.00 → 25
  7. 7. RGB → HEX

    #4C0519

All formats

HEX
#4c0519
RGB
rgb(76 5 25)
RGB (legacy)
rgb(76, 5, 25)
HSL
hsl(343.10 87.65% 15.88%) → hsl(343 88% 16%)
HWB
hwb(343 2% 70%)
OKLCH
oklch(0.271 0.101 12.1) · oklch(27.1% 0.101 12.1)
OKLab
oklab(0.271 0.099 0.021)
Lab (D50)
lab(14.26 32.69 9.36)
LCH (D50)
lch(14.26 34.00 15.98)
Display P3
color(display-p3 0.2710 0.0492 0.1011)
Linear sRGB
color(srgb-linear 0.0723 0.0015 0.0097)

Gamut: sRGB and Display P3

#4C0519 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.108 and Display P3 reaches 0.122; this color uses 93% of the sRGB chroma available.

CSS snippets

.element {
  color: #4c0519;
  color: rgb(76 5 25);
  color: hsl(343 88% 16%);
  color: oklch(0.271 0.101 12.1);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.271 0.101 12.1);
}
/* arbitrary values */
class="text-[#4c0519] bg-[oklch(0.271_0.101_12.1)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.2710 0.0492 0.1011); }
}

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

  • #5E1927 · oklch(0.331 0.101 12.1) · ΔL +0.06
  • #3A000B · oklch(0.211 0.101 12.1) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?