OKLCH to HEX: #FF00FF
Also known as: CSS fuchsia, CSS magenta
Result
oklch(0.70167 0.32249 328.363) → #FF00FF
Values are shown at full precision, so converting back gives exactly #ff00ff. 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.70167 0.32249 328.363)
2. OKLCH → Oklab
a = C·cos H = 0.27456 b = C·sin H = -0.16916
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.773985 m′ = L − 0.1056·a − 0.0639·b = 0.683488 s′ = L − 0.0895·a − 1.2915·b = 0.895565
4. cube
l = 0.773985³ = 0.463658 m = 0.683488³ = 0.319295 s = 0.895565³ = 0.718277
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.999979 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.000000 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.999996
6. linear → sRGB, × 255
R = 0.99999 × 255 = 255.00 → 255 G = 0.00000 × 255 = 0.00 → 0 B = 1.00000 × 255 = 255.00 → 255
7. RGB → HEX
#FF00FF
All formats
- HEX
- #ff00ff
- RGB
- rgb(255 0 255)
- RGB (legacy)
- rgb(255, 0, 255)
- HSL
- hsl(300.00 100.00% 50.00%) → hsl(300 100% 50%)
- HWB
- hwb(300 0% 0%)
- OKLCH
- oklch(0.702 0.322 328.4) · oklch(70.2% 0.322 328.4)
- OKLab
- oklab(0.702 0.275 -0.169)
- Lab (D50)
- lab(60.17 93.54 -60.50)
- LCH (D50)
- lch(60.17 111.40 327.11)
- Display P3
- color(display-p3 0.9175 0.2003 0.9675)
- Linear sRGB
- color(srgb-linear 1.0000 0.0000 1.0000)
Gamut: sRGB and Display P3
#FF00FF is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.322 and Display P3 reaches 0.352; this color uses 100% of the sRGB chroma available.
CSS snippets
.element {
color: #ff00ff;
color: rgb(255 0 255);
color: hsl(300 100% 50%);
color: oklch(0.702 0.322 328.4);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.702 0.322 328.4);
}
/* arbitrary values */
class="text-[#ff00ff] bg-[oklch(0.702_0.322_328.4)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9175 0.2003 0.9675); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #ff00ff calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- fuchsia-500#E12AFB
- v3 fuchsia-500#D946EF
- fuchsia-400#ED6AFF
- fuchsia-600#C800DE
- v3 fuchsia-400#E879F9
- v3 fuchsia-600#C026D3
- orchid#DA70D6
- mediumorchid#BA55D3
Lighter and darker, same hue and chroma
- #FF38FF · oklch(0.762 0.322 328.4) · ΔL +0.06
- #E900EA · oklch(0.642 0.322 328.4) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?