HEX to HSL: #7B68EE
Also known as: CSS mediumslateblue
Result
#7B68EE → hsl(249 80% 67%)
Values are shown at full precision, so converting back gives exactly #7b68ee. 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. RGB ÷ 255
R = 0.4824 G = 0.4078 B = 0.9333
2. max, min, Δ
max = 0.9333 min = 0.4078 Δ = max − min = 0.5255
3. L
L = (max + min) / 2 = 0.6706 = 67.06%
4. S
S = Δ / (1 − |2L − 1|) = 0.7976 = 79.76%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.4824 − 0.4078) / 0.5255 + 4) = 248.51°
6. HSL
hsl(248.51 79.76% 67.06%)
All formats
- HEX
- #7b68ee
- RGB
- rgb(123 104 238)
- RGB (legacy)
- rgb(123, 104, 238)
- HSL
- hsl(248.51 79.76% 67.06%) → hsl(249 80% 67%)
- HWB
- hwb(249 41% 7%)
- OKLCH
- oklch(0.604 0.194 285.5) · oklch(60.4% 0.194 285.5)
- OKLab
- oklab(0.604 0.052 -0.187)
- Lab (D50)
- lab(51.28 33.84 -66.48)
- LCH (D50)
- lch(51.28 74.59 296.98)
- Display P3
- color(display-p3 0.4702 0.4106 0.9023)
- Linear sRGB
- color(srgb-linear 0.1981 0.1384 0.8550)
Gamut: sRGB and Display P3
#7B68EE is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.225 and Display P3 reaches 0.243; this color uses 86% of the sRGB chroma available.
CSS snippets
.element {
color: #7b68ee;
color: rgb(123 104 238);
color: hsl(249 80% 67%);
color: oklch(0.604 0.194 285.5);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.604 0.194 285.5);
}
/* arbitrary values */
class="text-[#7b68ee] bg-[oklch(0.604_0.194_285.5)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.4702 0.4106 0.9023); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #7b68ee calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 violet-500#8B5CF6
- v3 indigo-500#6366F1
- indigo-500#615FFF
- mediumpurple#9370DB
- violet-500#8E51FF
- slateblue#6A5ACD
- indigo-400#7C86FF
- royalblue#4169E1
Lighter and darker, same hue and chroma
- #8C7BFF · oklch(0.664 0.194 285.5) · ΔL +0.06
- #6B55D9 · oklch(0.544 0.194 285.5) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?