OKLCH to HEX: #818CF8
Also known as: Tailwind v3 indigo-400
Result
oklch(0.68011 0.15830 276.935) → #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
oklch(0.68011 0.15830 276.935)
2. OKLCH → Oklab
a = C·cos H = 0.01911 b = C·sin H = -0.15714
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.653774 m′ = L − 0.1056·a − 0.0639·b = 0.688126 s′ = L − 0.0895·a − 1.2915·b = 0.881346
4. cube
l = 0.653774³ = 0.279436 m = 0.688126³ = 0.325840 s = 0.881346³ = 0.684604
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.219525 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.262248 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.938665
6. linear → sRGB, × 255
R = 0.50588 × 255 = 129.00 → 129 G = 0.54902 × 255 = 140.00 → 140 B = 0.97254 × 255 = 248.00 → 248
7. 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?