HEX to RGB: #9932CC

Also known as: CSS darkorchid

Result

#9932CC → rgb(153 50 204)

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. 1. HEX → pairs

    #9932CC → 99 | 32 | CC
  2. 2. base 16 → base 10

    R = 99₁₆ = 9×16 + 9 = 153
    G = 32₁₆ = 3×16 + 2 = 50
    B = CC₁₆ = 12×16 + 12 = 204
  3. 3. RGB

    rgb(153 50 204)

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).

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

All converters →

Guides: What is OKLCH?