OKLCH to HEX: #59168B

Also known as: Tailwind purple-900

Result

oklch(0.38018 0.17611 304.783) → #59168B

Values are shown at full precision, so converting back gives exactly #59168b. 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.38018 0.17611 304.783)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.10047
    b = C·sin H = -0.14464
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.388784
    m′ = L − 0.1056·a − 0.0639·b = 0.378811
    s′ = L − 0.0895·a − 1.2915·b = 0.557994
  4. 4. cube

    l = 0.388784³ = 0.058766
    m = 0.378811³ = 0.054358
    s = 0.557994³ = 0.173735
  5. 5. LMS → linear sRGB

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

    R = 0.34902 × 255 = 89.00 → 89
    G = 0.08627 × 255 = 22.00 → 22
    B = 0.54510 × 255 = 139.00 → 139
  7. 7. RGB → HEX

    #59168B

All formats

HEX
#59168b
RGB
rgb(89 22 139)
RGB (legacy)
rgb(89, 22, 139)
HSL
hsl(274.36 72.67% 31.57%) → hsl(274 73% 32%)
HWB
hwb(274 9% 45%)
OKLCH
oklch(0.380 0.176 304.8) · oklch(38.0% 0.176 304.8)
OKLab
oklab(0.380 0.100 -0.145)
Lab (D50)
lab(24.84 45.27 -51.43)
LCH (D50)
lch(24.84 68.51 311.35)
Display P3
color(display-p3 0.3201 0.1066 0.5244)
Linear sRGB
color(srgb-linear 0.0999 0.0080 0.2582)

Gamut: sRGB and Display P3

#59168B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.198 and Display P3 reaches 0.207; this color uses 89% of the sRGB chroma available.

CSS snippets

.element {
  color: #59168b;
  color: rgb(89 22 139);
  color: hsl(274 73% 32%);
  color: oklch(0.380 0.176 304.8);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.380 0.176 304.8);
}
/* arbitrary values */
class="text-[#59168b] bg-[oklch(0.380_0.176_304.8)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.3201 0.1066 0.5244); }
}

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

  • #6A2C9E · oklch(0.440 0.176 304.8) · ΔL +0.06
  • #490078 · oklch(0.320 0.176 304.8) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?