OKLCH to HEX: #9333EA

Also known as: Tailwind v3 purple-600

Result

oklch(0.55754 0.25249 302.321) → #9333EA

Values are shown at full precision, so converting back gives exactly #9333ea. 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.55754 0.25249 302.321)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.13500
    b = C·sin H = -0.21337
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.564998
    m′ = L − 0.1056·a − 0.0639·b = 0.556914
    s′ = L − 0.0895·a − 1.2915·b = 0.821025
  4. 4. cube

    l = 0.564998³ = 0.180360
    m = 0.556914³ = 0.172729
    s = 0.821025³ = 0.553438
  5. 5. LMS → linear sRGB

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

    R = 0.57647 × 255 = 147.00 → 147
    G = 0.20000 × 255 = 51.00 → 51
    B = 0.91766 × 255 = 234.00 → 234
  7. 7. RGB → HEX

    #9333EA

All formats

HEX
#9333ea
RGB
rgb(147 51 234)
RGB (legacy)
rgb(147, 51, 234)
HSL
hsl(271.48 81.33% 55.88%) → hsl(271 81% 56%)
HWB
hwb(271 20% 8%)
OKLCH
oklch(0.558 0.252 302.3) · oklch(55.8% 0.252 302.3)
OKLab
oklab(0.558 0.135 -0.213)
Lab (D50)
lab(44.02 63.35 -75.85)
LCH (D50)
lch(44.02 98.82 309.87)
Display P3
color(display-p3 0.5330 0.2257 0.8842)
Linear sRGB
color(srgb-linear 0.2918 0.0331 0.8228)

Gamut: sRGB and Display P3

#9333EA is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.294 and Display P3 reaches 0.307; this color uses 86% of the sRGB chroma available.

CSS snippets

.element {
  color: #9333ea;
  color: rgb(147 51 234);
  color: hsl(271 81% 56%);
  color: oklch(0.558 0.252 302.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.558 0.252 302.3);
}
/* arbitrary values */
class="text-[#9333ea] bg-[oklch(0.558_0.252_302.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.5330 0.2257 0.8842); }
}

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

  • #A54BFF · oklch(0.618 0.252 302.3) · ΔL +0.06
  • #8113D5 · oklch(0.498 0.252 302.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?