OKLCH to HEX: #EC4899
Also known as: Tailwind v3 pink-500
Result
oklch(0.65592 0.21177 354.308) → #EC4899
Values are shown at full precision, so converting back gives exactly #ec4899. 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.65592 0.21177 354.308)
2. OKLCH → Oklab
a = C·cos H = 0.21073 b = C·sin H = -0.02100
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.734906 m′ = L − 0.1056·a − 0.0639·b = 0.635017 s′ = L − 0.0895·a − 1.2915·b = 0.664189
4. cube
l = 0.734906³ = 0.396913 m = 0.635017³ = 0.256068 s = 0.664189³ = 0.293005
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.838788 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.064808 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.318551
6. linear → sRGB, × 255
R = 0.92548 × 255 = 236.00 → 236 G = 0.28236 × 255 = 72.00 → 72 B = 0.60000 × 255 = 153.00 → 153
7. RGB → HEX
#EC4899
All formats
- HEX
- #ec4899
- RGB
- rgb(236 72 153)
- RGB (legacy)
- rgb(236, 72, 153)
- HSL
- hsl(330.37 81.19% 60.39%) → hsl(330 81% 60%)
- HWB
- hwb(330 28% 7%)
- OKLCH
- oklch(0.656 0.212 354.3) · oklch(65.6% 0.212 354.3)
- OKLab
- oklab(0.656 0.211 -0.021)
- Lab (D50)
- lab(57.31 67.87 -7.12)
- LCH (D50)
- lch(57.31 68.24 354.01)
- Display P3
- color(display-p3 0.8551 0.3327 0.5918)
- Linear sRGB
- color(srgb-linear 0.8388 0.0648 0.3185)
Gamut: sRGB and Display P3
#EC4899 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.267 and Display P3 reaches 0.303; this color uses 79% of the sRGB chroma available.
CSS snippets
.element {
color: #ec4899;
color: rgb(236 72 153);
color: hsl(330 81% 60%);
color: oklch(0.656 0.212 354.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.656 0.212 354.3);
}
/* arbitrary values */
class="text-[#ec4899] bg-[oklch(0.656_0.212_354.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.8551 0.3327 0.5918); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #ec4899 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- pink-500#F6339A
- deeppink#FF1493
- pink-400#FB64B6
- v3 pink-600#DB2777
- pink-600#E60076
- hotpink#FF69B4
- palevioletred#DB7093
- v3 pink-400#F472B6
Lighter and darker, same hue and chroma
- #FF5DAC · oklch(0.716 0.212 354.3) · ΔL +0.06
- #D63187 · oklch(0.596 0.212 354.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?