OKLCH to HEX: #C4B5FD

Also known as: Tailwind v3 violet-300

Result

oklch(0.81116 0.10129 293.571) → #C4B5FD

Values are shown at full precision, so converting back gives exactly #c4b5fd. 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.81116 0.10129 293.571)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.04050
    b = C·sin H = -0.09284
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.807178
    m′ = L − 0.1056·a − 0.0639·b = 0.812812
    s′ = L − 0.0895·a − 1.2915·b = 0.927436
  4. 4. cube

    l = 0.807178³ = 0.525907
    m = 0.812812³ = 0.536996
    s = 0.927436³ = 0.797721
  5. 5. LMS → linear sRGB

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

    R = 0.76862 × 255 = 196.00 → 196
    G = 0.70980 × 255 = 181.00 → 181
    B = 0.99216 × 255 = 253.00 → 253
  7. 7. RGB → HEX

    #C4B5FD

All formats

HEX
#c4b5fd
RGB
rgb(196 181 253)
RGB (legacy)
rgb(196, 181, 253)
HSL
hsl(252.50 94.74% 85.10%) → hsl(253 95% 85%)
HWB
hwb(252 71% 1%)
OKLCH
oklch(0.811 0.101 293.6) · oklch(81.1% 0.101 293.6)
OKLab
oklab(0.811 0.041 -0.093)
Lab (D50)
lab(76.90 16.54 -33.91)
LCH (D50)
lch(76.90 37.73 296.00)
Display P3
color(display-p3 0.7586 0.7119 0.9719)
Linear sRGB
color(srgb-linear 0.5520 0.4621 0.9823)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #c4b5fd;
  color: rgb(196 181 253);
  color: hsl(253 95% 85%);
  color: oklch(0.811 0.101 293.6);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.811 0.101 293.6);
}
/* arbitrary values */
class="text-[#c4b5fd] bg-[oklch(0.811_0.101_293.6)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.7586 0.7119 0.9719); }
}

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

  • #D7C8FF · oklch(0.871 0.101 293.6) · ΔL +0.06
  • #B1A2E9 · oklch(0.751 0.101 293.6) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?