OKLCH to HEX: #3B0764
Also known as: Tailwind v3 purple-950
Result
oklch(0.29052 0.14324 302.717) → #3B0764
Values are shown at full precision, so converting back gives exactly #3b0764. 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.29052 0.14324 302.717)
2. OKLCH → Oklab
a = C·cos H = 0.07742 b = C·sin H = -0.12052
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.295197 m′ = L − 0.1056·a − 0.0639·b = 0.290043 s′ = L − 0.0895·a − 1.2915·b = 0.439236
4. cube
l = 0.295197³ = 0.025724 m = 0.290043³ = 0.024400 s = 0.439236³ = 0.084741
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.043734 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.002125 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.127433
6. linear → sRGB, × 255
R = 0.23137 × 255 = 59.00 → 59 G = 0.02745 × 255 = 7.00 → 7 B = 0.39215 × 255 = 100.00 → 100
7. RGB → HEX
#3B0764
All formats
- HEX
- #3b0764
- RGB
- rgb(59 7 100)
- RGB (legacy)
- rgb(59, 7, 100)
- HSL
- hsl(273.55 86.92% 20.98%) → hsl(274 87% 21%)
- HWB
- hwb(274 3% 61%)
- OKLCH
- oklch(0.291 0.143 302.7) · oklch(29.1% 0.143 302.7)
- OKLab
- oklab(0.291 0.077 -0.121)
- Lab (D50)
- lab(14.94 36.96 -42.85)
- LCH (D50)
- lch(14.94 56.59 310.78)
- Display P3
- color(display-p3 0.2101 0.0451 0.3764)
- Linear sRGB
- color(srgb-linear 0.0437 0.0021 0.1274)
Gamut: sRGB and Display P3
#3B0764 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.153 and Display P3 reaches 0.160; this color uses 94% of the sRGB chroma available.
CSS snippets
.element {
color: #3b0764;
color: rgb(59 7 100);
color: hsl(274 87% 21%);
color: oklch(0.291 0.143 302.7);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.291 0.143 302.7);
}
/* arbitrary values */
class="text-[#3b0764] bg-[oklch(0.291_0.143_302.7)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2101 0.0451 0.3764); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #3b0764 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- purple-950#3C0366
- violet-950#2F0D68
- v3 violet-950#2E1065
- v3 fuchsia-950#4A044E
- fuchsia-950#4B004F
- indigo#4B0082
- midnightblue#191970
- indigo-950#1E1A4D
Lighter and darker, same hue and chroma
- #4B1D76 · oklch(0.351 0.143 302.7) · ΔL +0.06
- #2C0052 · oklch(0.231 0.143 302.7) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?