HSL to HEX: #C71585
Also known as: CSS mediumvioletred
Result
hsl(322.25 80.91% 43.14%) → #C71585
Values are shown at full precision, so converting back gives exactly #c71585. 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
H = 322.25°, S = 80.91%, L = 43.14%
2. C
C = (1 − |2L − 1|) × S = 0.69809
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.43922 (H / 60° = 5.3708, sector 5)
4. m
m = L − C / 2 = 0.08235
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.69809, 0.00000, 0.43922) R = round((0.69809 + 0.08235) × 255) = 199 G = round((0.00000 + 0.08235) × 255) = 21 B = round((0.43922 + 0.08235) × 255) = 133
6. RGB → HEX
#C71585
All formats
- HEX
- #c71585
- RGB
- rgb(199 21 133)
- RGB (legacy)
- rgb(199, 21, 133)
- HSL
- hsl(322.25 80.91% 43.14%) → hsl(322 81% 43%)
- HWB
- hwb(322 8% 22%)
- OKLCH
- oklch(0.553 0.222 349.7) · oklch(55.3% 0.222 349.7)
- OKLab
- oklab(0.553 0.218 -0.040)
- Lab (D50)
- lab(45.17 69.57 -14.07)
- LCH (D50)
- lch(45.17 70.97 348.57)
- Display P3
- color(display-p3 0.7160 0.1763 0.5105)
- Linear sRGB
- color(srgb-linear 0.5711 0.0075 0.2346)
Gamut: sRGB and Display P3
#C71585 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.231 and Display P3 reaches 0.259; this color uses 96% of the sRGB chroma available.
CSS snippets
.element {
color: #c71585;
color: rgb(199 21 133);
color: hsl(322 81% 43%);
color: oklch(0.553 0.222 349.7);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.553 0.222 349.7);
}
/* arbitrary values */
class="text-[#c71585] bg-[oklch(0.553_0.222_349.7)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.7160 0.1763 0.5105); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #c71585 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 pink-600#DB2777
- pink-700#C6005C
- v3 pink-700#BE185D
- pink-600#E60076
- v3 pink-500#EC4899
- pink-500#F6339A
- v3 fuchsia-700#A21CAF
- v3 rose-700#BE123C
Lighter and darker, same hue and chroma
- #DC3397 · oklch(0.613 0.222 349.7) · ΔL +0.06
- #B20073 · oklch(0.493 0.222 349.7) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?