OKLCH to HEX: #5D0EC0

Also known as: Tailwind violet-800

Result

oklch(0.43164 0.23197 292.712) → #5D0EC0

Values are shown at full precision, so converting back gives exactly #5d0ec0. 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. input

    oklch(0.43164 0.23197 292.712)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.08956
    b = C·sin H = -0.21398
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.420959
    m′ = L − 0.1056·a − 0.0639·b = 0.435849
    s′ = L − 0.0895·a − 1.2915·b = 0.699981
  4. 4. cube

    l = 0.420959³ = 0.074597
    m = 0.435849³ = 0.082796
    s = 0.699981³ = 0.342972
  5. 5. LMS → linear sRGB

    R = 4.0767·l − 3.3077·m + 0.2310·s = 0.109463
    G = −1.2684·l + 2.6098·m − 0.3413·s = 0.004393
    B = −0.0042·l − 0.7034·m + 1.7076·s = 0.527110
  6. 6. linear → sRGB, × 255

    R = 0.36471 × 255 = 93.00 → 93
    G = 0.05492 × 255 = 14.00 → 14
    B = 0.75294 × 255 = 192.00 → 192
  7. 7. RGB → HEX

    #5D0EC0

All formats

HEX
#5d0ec0
RGB
rgb(93 14 192)
RGB (legacy)
rgb(93, 14, 192)
HSL
hsl(266.63 86.41% 40.39%) → hsl(267 86% 40%)
HWB
hwb(267 5% 25%)
OKLCH
oklch(0.432 0.232 292.7) · oklch(43.2% 0.232 292.7)
OKLab
oklab(0.432 0.090 -0.214)
Lab (D50)
lab(29.27 57.79 -76.17)
LCH (D50)
lch(29.27 95.61 307.19)
Display P3
color(display-p3 0.3333 0.0852 0.7235)
Linear sRGB
color(srgb-linear 0.1095 0.0044 0.5271)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #5d0ec0;
  color: rgb(93 14 192);
  color: hsl(267 86% 40%);
  color: oklch(0.432 0.232 292.7);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.432 0.232 292.7);
}
/* arbitrary values */
class="text-[#5d0ec0] bg-[oklch(0.432_0.232_292.7)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.3333 0.0852 0.7235); }
}

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

  • #6D2ED5 · oklch(0.492 0.232 292.7) · ΔL +0.06
  • #4E00AC · oklch(0.372 0.232 292.7) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?