HEX to OKLCH: #DDA0DD

Also known as: CSS plum

Result

#DDA0DD → oklch(0.783 0.108 326.5)

Values are shown at full precision, so converting back gives exactly #dda0dd. 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. sRGB → linear

    R: 221/255 = 0.86667 → 0.723055  (((x + 0.055) / 1.055)^2.4)
    G: 160/255 = 0.62745 → 0.351533  (((x + 0.055) / 1.055)^2.4)
    B: 221/255 = 0.86667 → 0.723055  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.523796
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.470160
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.618390
  3. 3. cube root

    l′ = ∛0.523796 = 0.806097
    m′ = ∛0.470160 = 0.777586
    s′ = ∛0.618390 = 0.851963
  4. 4. LMS′ → Oklab

    L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.78328
    a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.08991
    b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.05941
  5. 5. Oklab → OKLCH

    C = √(a² + b²) = 0.10776
    H = atan2(b, a) = 326.545°
    L = 0.78328
  6. 6. OKLCH

    oklch(0.78328 0.10776 326.545)
    rounded: oklch(0.783 0.108 326.5)

All formats

HEX
#dda0dd
RGB
rgb(221 160 221)
RGB (legacy)
rgb(221, 160, 221)
HSL
hsl(300.00 47.29% 74.71%) → hsl(300 47% 75%)
HWB
hwb(300 63% 13%)
OKLCH
oklch(0.783 0.108 326.5) · oklch(78.3% 0.108 326.5)
OKLab
oklab(0.783 0.090 -0.059)
Lab (D50)
lab(73.33 30.64 -21.80)
LCH (D50)
lch(73.33 37.60 324.58)
Display P3
color(display-p3 0.8307 0.6373 0.8522)
Linear sRGB
color(srgb-linear 0.7231 0.3515 0.7231)

Gamut: sRGB and Display P3

#DDA0DD is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.213 and Display P3 reaches 0.236; this color uses 51% of the sRGB chroma available.

CSS snippets

.element {
  color: #dda0dd;
  color: rgb(221 160 221);
  color: hsl(300 47% 75%);
  color: oklch(0.783 0.108 326.5);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.783 0.108 326.5);
}
/* arbitrary values */
class="text-[#dda0dd] bg-[oklch(0.783_0.108_326.5)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.8307 0.6373 0.8522); }
}

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

  • #F1B3F1 · oklch(0.843 0.108 326.5) · ΔL +0.06
  • #C98DC9 · oklch(0.723 0.108 326.5) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?