OKLCH to HEX: #E12AFB
Also known as: Tailwind fuchsia-500
Result
oklch(0.66636 0.29502 322.080) → #E12AFB
Values are shown at full precision, so converting back gives exactly #e12afb. 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.66636 0.29502 322.080)
2. OKLCH → Oklab
a = C·cos H = 0.23273 b = C·sin H = -0.18131
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.719474 m′ = L − 0.1056·a − 0.0639·b = 0.653370 s′ = L − 0.0895·a − 1.2915·b = 0.879690
4. cube
l = 0.719474³ = 0.372430 m = 0.653370³ = 0.278918 s = 0.879690³ = 0.680753
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.752954 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.023150 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.964705
6. linear → sRGB, × 255
R = 0.88236 × 255 = 225.00 → 225 G = 0.16469 × 255 = 42.00 → 42 B = 0.98432 × 255 = 251.00 → 251
7. RGB → HEX
#E12AFB
All formats
- HEX
- #e12afb
- RGB
- rgb(225 42 251)
- RGB (legacy)
- rgb(225, 42, 251)
- HSL
- hsl(292.54 96.31% 57.45%) → hsl(293 96% 57%)
- HWB
- hwb(293 16% 2%)
- OKLCH
- oklch(0.666 0.295 322.1) · oklch(66.6% 0.295 322.1)
- OKLab
- oklab(0.666 0.233 -0.181)
- Lab (D50)
- lab(56.35 83.11 -64.74)
- LCH (D50)
- lch(56.35 105.35 322.08)
- Display P3
- color(display-p3 0.8114 0.2411 0.9514)
- Linear sRGB
- color(srgb-linear 0.7529 0.0232 0.9647)
Gamut: sRGB and Display P3
#E12AFB is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.307 and Display P3 reaches 0.335; this color uses 96% of the sRGB chroma available.
CSS snippets
.element {
color: #e12afb;
color: rgb(225 42 251);
color: hsl(293 96% 57%);
color: oklch(0.666 0.295 322.1);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.666 0.295 322.1);
}
/* arbitrary values */
class="text-[#e12afb] bg-[oklch(0.666_0.295_322.1)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.8114 0.2411 0.9514); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #e12afb calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 fuchsia-500#D946EF
- fuchsia#FF00FF
- fuchsia-600#C800DE
- v3 fuchsia-600#C026D3
- fuchsia-400#ED6AFF
- purple-500#AD46FF
- mediumorchid#BA55D3
- v3 purple-500#A855F7
Lighter and darker, same hue and chroma
- #F647FF · oklch(0.726 0.295 322.1) · ΔL +0.06
- #CC00E6 · oklch(0.606 0.295 322.1) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?