HSL to HEX: #6A5ACD
Also known as: CSS slateblue
Result
hsl(248.35 53.49% 57.84%) → #6A5ACD
Values are shown at full precision, so converting back gives exactly #6a5acd. 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 = 248.35°, S = 53.49%, L = 57.84%
2. C
C = (1 − |2L − 1|) × S = 0.45103
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.06277 (H / 60° = 4.1392, sector 4)
4. m
m = L − C / 2 = 0.35289
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.06277, 0.00000, 0.45103) R = round((0.06277 + 0.35289) × 255) = 106 G = round((0.00000 + 0.35289) × 255) = 90 B = round((0.45103 + 0.35289) × 255) = 205
6. RGB → HEX
#6A5ACD
All formats
- HEX
- #6a5acd
- RGB
- rgb(106 90 205)
- RGB (legacy)
- rgb(106, 90, 205)
- HSL
- hsl(248.35 53.49% 57.84%) → hsl(248 53% 58%)
- HWB
- hwb(248 35% 20%)
- OKLCH
- oklch(0.544 0.171 285.5) · oklch(54.4% 0.171 285.5)
- OKLab
- oklab(0.544 0.046 -0.165)
- Lab (D50)
- lab(44.57 29.65 -58.72)
- LCH (D50)
- lch(44.57 65.78 296.79)
- Display P3
- color(display-p3 0.4054 0.3552 0.7771)
- Linear sRGB
- color(srgb-linear 0.1441 0.1022 0.6105)
Gamut: sRGB and Display P3
#6A5ACD is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.266 and Display P3 reaches 0.286; this color uses 64% of the sRGB chroma available.
CSS snippets
.element {
color: #6a5acd;
color: rgb(106 90 205);
color: hsl(248 53% 58%);
color: oklch(0.544 0.171 285.5);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.544 0.171 285.5);
}
/* arbitrary values */
class="text-[#6a5acd] bg-[oklch(0.544_0.171_285.5)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.4054 0.3552 0.7771); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #6a5acd calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 indigo-500#6366F1
- royalblue#4169E1
- mediumslateblue#7B68EE
- v3 indigo-600#4F46E5
- indigo-500#615FFF
- v3 violet-600#7C3AED
- v3 violet-500#8B5CF6
- v3 blue-600#2563EB
Lighter and darker, same hue and chroma
- #7B6DE1 · oklch(0.604 0.171 285.5) · ΔL +0.06
- #5A47B9 · oklch(0.484 0.171 285.5) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?