HSL to HEX: #6D28D9
Also known as: Tailwind v3 violet-700
Result
hsl(263.39 69.96% 50.39%) → #6D28D9
Values are shown at full precision, so converting back gives exactly #6d28d9. 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 = 263.39°, S = 69.96%, L = 50.39%
2. C
C = (1 − |2L − 1|) × S = 0.69414
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.27060 (H / 60° = 4.3898, sector 4)
4. m
m = L − C / 2 = 0.15683
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.27060, 0.00000, 0.69414) R = round((0.27060 + 0.15683) × 255) = 109 G = round((0.00000 + 0.15683) × 255) = 40 B = round((0.69414 + 0.15683) × 255) = 217
6. RGB → HEX
#6D28D9
All formats
- HEX
- #6d28d9
- RGB
- rgb(109 40 217)
- RGB (legacy)
- rgb(109, 40, 217)
- HSL
- hsl(263.39 69.96% 50.39%) → hsl(263 70% 50%)
- HWB
- hwb(263 16% 15%)
- OKLCH
- oklch(0.491 0.241 292.6) · oklch(49.1% 0.241 292.6)
- OKLab
- oklab(0.491 0.093 -0.223)
- Lab (D50)
- lab(36.23 57.47 -79.15)
- LCH (D50)
- lch(36.23 97.82 305.98)
- Display P3
- color(display-p3 0.3952 0.1741 0.8187)
- Linear sRGB
- color(srgb-linear 0.1529 0.0212 0.6939)
Gamut: sRGB and Display P3
#6D28D9 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.273 and Display P3 reaches 0.281; this color uses 88% of the sRGB chroma available.
CSS snippets
.element {
color: #6d28d9;
color: rgb(109 40 217);
color: hsl(263 70% 50%);
color: oklch(0.491 0.241 292.6);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.491 0.241 292.6);
}
/* arbitrary values */
class="text-[#6d28d9] bg-[oklch(0.491_0.241_292.6)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.3952 0.1741 0.8187); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #6d28d9 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- violet-700#7008E7
- v3 purple-700#7E22CE
- purple-700#8200DB
- v3 violet-600#7C3AED
- blueviolet#8A2BE2
- violet-800#5D0EC0
- violet-600#7F22FE
- v3 violet-800#5B21B6
Lighter and darker, same hue and chroma
- #7D41EE · oklch(0.551 0.241 292.6) · ΔL +0.06
- #5E00C4 · oklch(0.431 0.241 292.6) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?