HSL to HEX: #A21CAF
Also known as: Tailwind v3 fuchsia-700
Result
hsl(294.69 72.41% 39.80%) → #A21CAF
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. input
H = 294.69°, S = 72.41%, L = 39.80%
2. C
C = (1 − |2L − 1|) × S = 0.57638
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.52537 (H / 60° = 4.9115, sector 4)
4. m
m = L − C / 2 = 0.10981
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.52537, 0.00000, 0.57638) R = round((0.52537 + 0.10981) × 255) = 162 G = round((0.00000 + 0.10981) × 255) = 28 B = round((0.57638 + 0.10981) × 255) = 175
6. RGB → HEX
#A21CAF
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).
- fuchsia-700#A800B7
- darkorchid#9932CC
- fuchsia-800#8A0194
- darkviolet#9400D3
- v3 fuchsia-800#86198F
- darkmagenta#8B008B
- v3 fuchsia-600#C026D3
- v3 purple-700#7E22CE
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
Guides: What is OKLCH?