RGB to HEX: #9932CC
Also known as: CSS darkorchid
Result
rgb(153 50 204) → #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. base 10 → base 16
R = 153 = 9×16 + 9 → 99 G = 50 = 3×16 + 2 → 32 B = 204 = 12×16 + 12 → CC
2. pairs → HEX
99 32 CC → #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?