HEX to OKLCH: #FF1493
Also known as: CSS deeppink
Result
#FF1493 → oklch(0.655 0.261 356.9)
Values are shown at full precision, so converting back gives exactly #ff1493. 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. sRGB → linear
R: 255/255 = 1.00000 → 1.000000 (((x + 0.055) / 1.055)^2.4) G: 20/255 = 0.07843 → 0.006995 (((x + 0.055) / 1.055)^2.4) B: 147/255 = 0.57647 → 0.291771 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.430984 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.248001 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.274082
3. cube root
l′ = ∛0.430984 = 0.755359 m′ = ∛0.248001 = 0.628277 s′ = ∛0.274082 = 0.649572
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.65493 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.26097 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.01393
5. Oklab → OKLCH
C = √(a² + b²) = 0.26134 H = atan2(b, a) = 356.945° L = 0.65493
6. OKLCH
oklch(0.65493 0.26134 356.945) rounded: oklch(0.655 0.261 356.9)
All formats
- HEX
- #ff1493
- RGB
- rgb(255 20 147)
- RGB (legacy)
- rgb(255, 20, 147)
- HSL
- hsl(327.57 100.00% 53.92%) → hsl(328 100% 54%)
- HWB
- hwb(328 8% 0%)
- OKLCH
- oklch(0.655 0.261 356.9) · oklch(65.5% 0.261 356.9)
- OKLab
- oklab(0.655 0.261 -0.014)
- Lab (D50)
- lab(56.60 83.45 -4.12)
- LCH (D50)
- lch(56.60 83.55 357.17)
- Display P3
- color(display-p3 0.9181 0.2208 0.5687)
- Linear sRGB
- color(srgb-linear 1.0000 0.0070 0.2918)
Gamut: sRGB and Display P3
#FF1493 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.261 and Display P3 reaches 0.301; this color uses 100% of the sRGB chroma available.
CSS snippets
.element {
color: #ff1493;
color: rgb(255 20 147);
color: hsl(328 100% 54%);
color: oklch(0.655 0.261 356.9);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.655 0.261 356.9);
}
/* arbitrary values */
class="text-[#ff1493] bg-[oklch(0.655_0.261_356.9)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9181 0.2208 0.5687); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #ff1493 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- pink-500#F6339A
- v3 pink-500#EC4899
- pink-600#E60076
- v3 pink-600#DB2777
- rose-500#FF2056
- pink-400#FB64B6
- v3 rose-500#F43F5E
- hotpink#FF69B4
Lighter and darker, same hue and chroma
- #FF39A5 · oklch(0.715 0.261 356.9) · ΔL +0.06
- #E90081 · oklch(0.595 0.261 356.9) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?