HSL to HEX: #FF1493

Also known as: CSS deeppink

Result

hsl(327.57 100.00% 53.92%) → #FF1493

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. 1. input

    H = 327.57°, S = 100.00%, L = 53.92%
  2. 2. C

    C = (1 − |2L − 1|) × S = 0.92160
  3. 3. X

    X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.49812   (H / 60° = 5.4595, sector 5)
  4. 4. m

    m = L − C / 2 = 0.07840
  5. 5. (R′, G′, B′) + m

    (R′, G′, B′) = (0.92160, 0.00000, 0.49812)
    R = round((0.92160 + 0.07840) × 255) = 255
    G = round((0.00000 + 0.07840) × 255) = 20
    B = round((0.49812 + 0.07840) × 255) = 147
  6. 6. RGB → HEX

    #FF1493

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).

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

All converters →

Guides: What is OKLCH?