HSL to HEX: #818CF8
Also known as: Tailwind v3 indigo-400
Result
hsl(234.45 89.47% 73.92%) → #818CF8
Values are shown at full precision, so converting back gives exactly #818cf8. 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 = 234.45°, S = 89.47%, L = 73.92%
2. C
C = (1 − |2L − 1|) × S = 0.46668
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.04317 (H / 60° = 3.9075, sector 3)
4. m
m = L − C / 2 = 0.50586
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.00000, 0.04317, 0.46668) R = round((0.00000 + 0.50586) × 255) = 129 G = round((0.04317 + 0.50586) × 255) = 140 B = round((0.46668 + 0.50586) × 255) = 248
6. RGB → HEX
#818CF8
All formats
- HEX
- #818cf8
- RGB
- rgb(129 140 248)
- RGB (legacy)
- rgb(129, 140, 248)
- HSL
- hsl(234.45 89.47% 73.92%) → hsl(234 89% 74%)
- HWB
- hwb(234 51% 3%)
- OKLCH
- oklch(0.680 0.158 276.9) · oklch(68.0% 0.158 276.9)
- OKLab
- oklab(0.680 0.019 -0.157)
- Lab (D50)
- lab(61.11 17.73 -56.28)
- LCH (D50)
- lch(61.11 59.00 287.48)
- Display P3
- color(display-p3 0.5139 0.5477 0.9441)
- Linear sRGB
- color(srgb-linear 0.2195 0.2623 0.9387)
Gamut: sRGB and Display P3
#818CF8 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.170 and Display P3 reaches 0.184; this color uses 93% of the sRGB chroma available.
CSS snippets
.element {
color: #818cf8;
color: rgb(129 140 248);
color: hsl(234 89% 74%);
color: oklch(0.680 0.158 276.9);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.680 0.158 276.9);
}
/* arbitrary values */
class="text-[#818cf8] bg-[oklch(0.680_0.158_276.9)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.5139 0.5477 0.9441); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #818cf8 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- indigo-400#7C86FF
- cornflowerblue#6495ED
- v3 violet-400#A78BFA
- violet-400#A684FF
- blue-400#51A2FF
- v3 blue-400#60A5FA
- mediumpurple#9370DB
- v3 blue-500#3B82F6
Lighter and darker, same hue and chroma
- #939FFF · oklch(0.740 0.158 276.9) · ΔL +0.06
- #7079E3 · oklch(0.620 0.158 276.9) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?