HEX to HSL: #6366F1
Also known as: Tailwind v3 indigo-500
Result
#6366F1 → hsl(239 84% 67%)
Values are shown at full precision, so converting back gives exactly #6366f1. 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.3882 G = 0.4000 B = 0.9451
2. max, min, Δ
max = 0.9451 min = 0.3882 Δ = max − min = 0.5569
3. L
L = (max + min) / 2 = 0.6667 = 66.67%
4. S
S = Δ / (1 − |2L − 1|) = 0.8353 = 83.53%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.3882 − 0.4000) / 0.5569 + 4) = 238.73°
6. HSL
hsl(238.73 83.53% 66.67%)
All formats
- HEX
- #6366f1
- RGB
- rgb(99 102 241)
- RGB (legacy)
- rgb(99, 102, 241)
- HSL
- hsl(238.73 83.53% 66.67%) → hsl(239 84% 67%)
- HWB
- hwb(239 39% 5%)
- OKLCH
- oklch(0.585 0.204 277.1) · oklch(58.5% 0.204 277.1)
- OKLab
- oklab(0.585 0.025 -0.202)
- Lab (D50)
- lab(49.05 30.34 -71.87)
- LCH (D50)
- lch(49.05 78.02 292.89)
- Display P3
- color(display-p3 0.3904 0.3996 0.9126)
- Linear sRGB
- color(srgb-linear 0.1248 0.1329 0.8796)
Gamut: sRGB and Display P3
#6366F1 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.229 and Display P3 reaches 0.246; this color uses 89% of the sRGB chroma available.
CSS snippets
.element {
color: #6366f1;
color: rgb(99 102 241);
color: hsl(239 84% 67%);
color: oklch(0.585 0.204 277.1);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.585 0.204 277.1);
}
/* arbitrary values */
class="text-[#6366f1] bg-[oklch(0.585_0.204_277.1)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.3904 0.3996 0.9126); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #6366f1 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- indigo-500#615FFF
- mediumslateblue#7B68EE
- royalblue#4169E1
- slateblue#6A5ACD
- v3 violet-500#8B5CF6
- v3 blue-600#2563EB
- v3 blue-500#3B82F6
- blue-500#2B7FFF
Lighter and darker, same hue and chroma
- #7379FF · oklch(0.645 0.204 277.1) · ΔL +0.06
- #5452DC · oklch(0.525 0.204 277.1) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?