OKLCH to HEX: #4F39F6
Also known as: Tailwind indigo-600
Result
oklch(0.51015 0.26180 276.936) → #4F39F6
Values are shown at full precision, so converting back gives exactly #4f39f6. 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.51015 0.26180 276.936)
2. OKLCH → Oklab
a = C·cos H = 0.03162 b = C·sin H = -0.25988
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.466596 m′ = L − 0.1056·a − 0.0639·b = 0.523407 s′ = L − 0.0895·a − 1.2915·b = 0.842957
4. cube
l = 0.466596³ = 0.101584 m = 0.523407³ = 0.143390 s = 0.842957³ = 0.598986
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.078185 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.040915 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.921548
6. linear → sRGB, × 255
R = 0.30980 × 255 = 79.00 → 79 G = 0.22353 × 255 = 57.00 → 57 B = 0.96469 × 255 = 246.00 → 246
7. RGB → HEX
#4F39F6
All formats
- HEX
- #4f39f6
- RGB
- rgb(79 57 246)
- RGB (legacy)
- rgb(79, 57, 246)
- HSL
- hsl(246.98 91.30% 59.41%) → hsl(247 91% 59%)
- HWB
- hwb(247 22% 4%)
- OKLCH
- oklch(0.510 0.262 276.9) · oklch(51.0% 0.262 276.9)
- OKLab
- oklab(0.510 0.032 -0.260)
- Lab (D50)
- lab(38.30 52.59 -92.32)
- LCH (D50)
- lch(38.30 106.25 299.67)
- Display P3
- color(display-p3 0.2966 0.2270 0.9277)
- Linear sRGB
- color(srgb-linear 0.0782 0.0409 0.9216)
Gamut: sRGB and Display P3
#4F39F6 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.278 and Display P3 reaches 0.298; this color uses 94% of the sRGB chroma available.
CSS snippets
.element {
color: #4f39f6;
color: rgb(79 57 246);
color: hsl(247 91% 59%);
color: oklch(0.510 0.262 276.9);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.510 0.262 276.9);
}
/* arbitrary values */
class="text-[#4f39f6] bg-[oklch(0.510_0.262_276.9)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2966 0.2270 0.9277); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #4f39f6 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 indigo-600#4F46E5
- indigo-700#432DD7
- blue-700#1447E6
- v3 indigo-700#4338CA
- v3 blue-700#1D4ED8
- blue-600#155DFC
- v3 violet-700#6D28D9
- violet-700#7008E7
Lighter and darker, same hue and chroma
- #5D51FF · oklch(0.570 0.262 276.9) · ΔL +0.06
- #431AE1 · oklch(0.450 0.262 276.9) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?