HEX to OKLCH: #C084FC

Also known as: Tailwind v3 purple-400

Result

#C084FC → oklch(0.722 0.177 305.5)

Values are shown at full precision, so converting back gives exactly #c084fc. 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: 192/255 = 0.75294 → 0.527115  (((x + 0.055) / 1.055)^2.4)
    G: 132/255 = 0.51765 → 0.230740  (((x + 0.055) / 1.055)^2.4)
    B: 252/255 = 0.98824 → 0.973445  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.391121
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.373307
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.724799
  3. 3. cube root

    l′ = ∛0.391121 = 0.731314
    m′ = ∛0.373307 = 0.720038
    s′ = ∛0.724799 = 0.898268
  4. 4. LMS′ → Oklab

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

    C = √(a² + b²) = 0.17669
    H = atan2(b, a) = 305.504°
    L = 0.72169
  6. 6. OKLCH

    oklch(0.72169 0.17669 305.504)
    rounded: oklch(0.722 0.177 305.5)

All formats

HEX
#c084fc
RGB
rgb(192 132 252)
RGB (legacy)
rgb(192, 132, 252)
HSL
hsl(270.00 95.24% 75.29%) → hsl(270 95% 75%)
HWB
hwb(270 52% 1%)
OKLCH
oklch(0.722 0.177 305.5) · oklch(72.2% 0.177 305.5)
OKLab
oklab(0.722 0.103 -0.144)
Lab (D50)
lab(65.10 40.55 -51.73)
LCH (D50)
lch(65.10 65.73 308.10)
Display P3
color(display-p3 0.7183 0.5277 0.9603)
Linear sRGB
color(srgb-linear 0.5271 0.2307 0.9734)

Gamut: sRGB and Display P3

#C084FC is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.183 and Display P3 reaches 0.200; this color uses 97% of the sRGB chroma available.

CSS snippets

.element {
  color: #c084fc;
  color: rgb(192 132 252);
  color: hsl(270 95% 75%);
  color: oklch(0.722 0.177 305.5);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.722 0.177 305.5);
}
/* arbitrary values */
class="text-[#c084fc] bg-[oklch(0.722_0.177_305.5)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.7183 0.5277 0.9603); }
}

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

  • #D397FF · oklch(0.782 0.177 305.5) · ΔL +0.06
  • #AD71E7 · oklch(0.662 0.177 305.5) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?