OKLCH to HEX: #831843

Also known as: Tailwind v3 pink-900

Result

oklch(0.40782 0.14418 2.432) → #831843

Values are shown at full precision, so converting back gives exactly #831843. 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.40782 0.14418 2.432)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.14405
    b = C·sin H = 0.00612
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.466233
    m′ = L − 0.1056·a − 0.0639·b = 0.392223
    s′ = L − 0.0895·a − 1.2915·b = 0.387028
  4. 4. cube

    l = 0.466233³ = 0.101346
    m = 0.392223³ = 0.060339
    s = 0.387028³ = 0.057973
  5. 5. LMS → linear sRGB

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

    R = 0.51373 × 255 = 131.00 → 131
    G = 0.09410 × 255 = 24.00 → 24
    B = 0.26274 × 255 = 67.00 → 67
  7. 7. RGB → HEX

    #831843

All formats

HEX
#831843
RGB
rgb(131 24 67)
RGB (legacy)
rgb(131, 24, 67)
HSL
hsl(335.89 69.03% 30.39%) → hsl(336 69% 30%)
HWB
hwb(336 9% 49%)
OKLCH
oklch(0.408 0.144 2.4) · oklch(40.8% 0.144 2.4)
OKLab
oklab(0.408 0.144 0.006)
Lab (D50)
lab(29.53 46.64 3.14)
LCH (D50)
lch(29.53 46.75 3.85)
Display P3
color(display-p3 0.4711 0.1351 0.2616)
Linear sRGB
color(srgb-linear 0.2270 0.0091 0.0561)

Gamut: sRGB and Display P3

#831843 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.165 and Display P3 reaches 0.185; this color uses 88% of the sRGB chroma available.

CSS snippets

.element {
  color: #831843;
  color: rgb(131 24 67);
  color: hsl(336 69% 30%);
  color: oklch(0.408 0.144 2.4);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.408 0.144 2.4);
}
/* arbitrary values */
class="text-[#831843] bg-[oklch(0.408_0.144_2.4)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.4711 0.1351 0.2616); }
}

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

  • #972D53 · oklch(0.468 0.144 2.4) · ΔL +0.06
  • #6F0033 · oklch(0.348 0.144 2.4) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?