OKLCH to HEX: #9932CC
Also known as: CSS darkorchid
Result
oklch(0.54111 0.22724 311.509) → #9932CC
Values are shown at full precision, so converting back gives exactly #9932cc. 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. input
oklch(0.54111 0.22724 311.509)
2. OKLCH → Oklab
a = C·cos H = 0.15060 b = C·sin H = -0.17017
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.564076 m′ = L − 0.1056·a − 0.0639·b = 0.536078 s′ = L − 0.0895·a − 1.2915·b = 0.747404
4. cube
l = 0.564076³ = 0.179478 m = 0.536078³ = 0.154058 s = 0.747404³ = 0.417510
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.318539 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.031893 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.603826
6. linear → sRGB, × 255
R = 0.59999 × 255 = 153.00 → 153 G = 0.19607 × 255 = 50.00 → 50 B = 0.80000 × 255 = 204.00 → 204
7. RGB → HEX
#9932CC
All formats
- HEX
- #9932cc
- RGB
- rgb(153 50 204)
- RGB (legacy)
- rgb(153, 50, 204)
- HSL
- hsl(280.13 60.63% 49.80%) → hsl(280 61% 50%)
- HWB
- hwb(280 20% 20%)
- OKLCH
- oklch(0.541 0.227 311.5) · oklch(54.1% 0.227 311.5)
- OKLab
- oklab(0.541 0.151 -0.170)
- Lab (D50)
- lab(42.82 59.94 -60.62)
- LCH (D50)
- lch(42.82 85.25 314.68)
- Display P3
- color(display-p3 0.5542 0.2249 0.7721)
- Linear sRGB
- color(srgb-linear 0.3185 0.0319 0.6038)
Gamut: sRGB and Display P3
#9932CC is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.271 and Display P3 reaches 0.288; this color uses 84% of the sRGB chroma available.
CSS snippets
.element {
color: #9932cc;
color: rgb(153 50 204);
color: hsl(280 61% 50%);
color: oklch(0.541 0.227 311.5);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.541 0.227 311.5);
}
/* arbitrary values */
class="text-[#9932cc] bg-[oklch(0.541_0.227_311.5)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.5542 0.2249 0.7721); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #9932cc calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- darkviolet#9400D3
- blueviolet#8A2BE2
- v3 purple-600#9333EA
- v3 fuchsia-700#A21CAF
- fuchsia-700#A800B7
- v3 purple-700#7E22CE
- purple-700#8200DB
- purple-600#9810FA
Lighter and darker, same hue and chroma
- #AC48E0 · oklch(0.601 0.227 311.5) · ΔL +0.06
- #8616B8 · oklch(0.481 0.227 311.5) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?