HEX to HSL: #A21CAF

Also known as: Tailwind v3 fuchsia-700

Result

#A21CAF → hsl(295 72% 40%)

Values are shown at full precision, so converting back gives exactly #a21caf. 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.6353
    G = 0.1098
    B = 0.6863
  2. 2. max, min, Δ

    max = 0.6863
    min = 0.1098
    Δ = max − min = 0.5765
  3. 3. L

    L = (max + min) / 2 = 0.3980 = 39.80%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.7241 = 72.41%
  5. 5. H

    max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.6353 − 0.1098) / 0.5765 + 4) = 294.69°
  6. 6. HSL

    hsl(294.69 72.41% 39.80%)

All formats

HEX
#a21caf
RGB
rgb(162 28 175)
RGB (legacy)
rgb(162, 28, 175)
HSL
hsl(294.69 72.41% 39.80%) → hsl(295 72% 40%)
HWB
hwb(295 11% 31%)
OKLCH
oklch(0.518 0.226 323.9) · oklch(51.8% 0.226 323.9)
OKLab
oklab(0.518 0.183 -0.133)
Lab (D50)
lab(40.36 64.13 -47.50)
LCH (D50)
lch(40.36 79.81 323.48)
Display P3
color(display-p3 0.5831 0.1650 0.6632)
Linear sRGB
color(srgb-linear 0.3613 0.0116 0.4287)

Gamut: sRGB and Display P3

#A21CAF is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.244 and Display P3 reaches 0.264; this color uses 93% of the sRGB chroma available.

CSS snippets

.element {
  color: #a21caf;
  color: rgb(162 28 175);
  color: hsl(295 72% 40%);
  color: oklch(0.518 0.226 323.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.518 0.226 323.9);
}
/* arbitrary values */
class="text-[#a21caf] bg-[oklch(0.518_0.226_323.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.5831 0.1650 0.6632); }
}

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

  • #B636C3 · oklch(0.578 0.226 323.9) · ΔL +0.06
  • #8E009C · oklch(0.458 0.226 323.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?