HSL to HEX: #5D0EC0
Also known as: Tailwind violet-800
Result
hsl(266.63 86.41% 40.39%) → #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. input
H = 266.63°, S = 86.41%, L = 40.39%
2. C
C = (1 − |2L − 1|) × S = 0.69802
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.30980 (H / 60° = 4.4438, sector 4)
4. m
m = L − C / 2 = 0.05489
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.30980, 0.00000, 0.69802) R = round((0.30980 + 0.05489) × 255) = 93 G = round((0.00000 + 0.05489) × 255) = 14 B = round((0.69802 + 0.05489) × 255) = 192
6. 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).
- v3 violet-800#5B21B6
- purple-800#6E11B0
- v3 purple-800#6B21A8
- v3 violet-700#6D28D9
- violet-900#4D179A
- v3 indigo-700#4338CA
- indigo-700#432DD7
- violet-700#7008E7
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
Guides: What is OKLCH?