HEX to HSL: #C4B5FD

Also known as: Tailwind v3 violet-300

Result

#C4B5FD → hsl(253 95% 85%)

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. RGB ÷ 255

    R = 0.7686
    G = 0.7098
    B = 0.9922
  2. 2. max, min, Δ

    max = 0.9922
    min = 0.7098
    Δ = max − min = 0.2824
  3. 3. L

    L = (max + min) / 2 = 0.8510 = 85.10%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.9474 = 94.74%
  5. 5. H

    max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.7686 − 0.7098) / 0.2824 + 4) = 252.50°
  6. 6. HSL

    hsl(252.50 94.74% 85.10%)

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?