OKLCH to HEX: #3730A3
Also known as: Tailwind v3 indigo-800
Result
oklch(0.39843 0.17734 277.366) → #3730A3
Values are shown at full precision, so converting back gives exactly #3730a3. 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.39843 0.17734 277.366)
2. OKLCH → Oklab
a = C·cos H = 0.02274 b = C·sin H = -0.17588
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.369486 m′ = L − 0.1056·a − 0.0639·b = 0.407260 s′ = L − 0.0895·a − 1.2915·b = 0.623537
4. cube
l = 0.369486³ = 0.050442 m = 0.407260³ = 0.067549 s = 0.623537³ = 0.242431
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.038203 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.029556 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.366252
6. linear → sRGB, × 255
R = 0.21568 × 255 = 55.00 → 55 G = 0.18823 × 255 = 48.00 → 48 B = 0.63921 × 255 = 163.00 → 163
7. RGB → HEX
#3730A3
All formats
- HEX
- #3730a3
- RGB
- rgb(55 48 163)
- RGB (legacy)
- rgb(55, 48, 163)
- HSL
- hsl(243.65 54.50% 41.37%) → hsl(244 55% 41%)
- HWB
- hwb(244 19% 36%)
- OKLCH
- oklch(0.398 0.177 277.4) · oklch(39.8% 0.177 277.4)
- OKLab
- oklab(0.398 0.023 -0.176)
- Lab (D50)
- lab(27.27 31.98 -62.36)
- LCH (D50)
- lch(27.27 70.08 297.15)
- Display P3
- color(display-p3 0.2111 0.1892 0.6149)
- Linear sRGB
- color(srgb-linear 0.0382 0.0296 0.3663)
Gamut: sRGB and Display P3
#3730A3 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.246 and Display P3 reaches 0.249; this color uses 72% of the sRGB chroma available.
CSS snippets
.element {
color: #3730a3;
color: rgb(55 48 163);
color: hsl(244 55% 41%);
color: oklch(0.398 0.177 277.4);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.398 0.177 277.4);
}
/* arbitrary values */
class="text-[#3730a3] bg-[oklch(0.398_0.177_277.4)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2111 0.1892 0.6149); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #3730a3 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- indigo-800#372AAC
- v3 blue-800#1E40AF
- blue-900#1C398E
- blue-800#193CB8
- indigo-900#312C85
- v3 violet-900#4C1D95
- v3 blue-900#1E3A8A
- violet-900#4D179A
Lighter and darker, same hue and chroma
- #4543B7 · oklch(0.458 0.177 277.4) · ΔL +0.06
- #2B1A8F · oklch(0.338 0.177 277.4) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?