HEX to HSL: #EC003F

Also known as: Tailwind rose-600

Result

#EC003F → hsl(344 100% 46%)

Values are shown at full precision, so converting back gives exactly #ec003f. 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. RGB ÷ 255

    R = 0.9255
    G = 0.0000
    B = 0.2471
  2. 2. max, min, Δ

    max = 0.9255
    min = 0.0000
    Δ = max − min = 0.9255
  3. 3. L

    L = (max + min) / 2 = 0.4627 = 46.27%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 1.0000 = 100.00%
  5. 5. H

    max is R → H = 60° × (((G − B) / Δ) mod 6) = 60° × (((0.0000 − 0.2471) / 0.9255) mod 6) = 343.98°
  6. 6. HSL

    hsl(343.98 100.00% 46.27%)

All formats

HEX
#ec003f
RGB
rgb(236 0 63)
RGB (legacy)
rgb(236, 0, 63)
HSL
hsl(343.98 100.00% 46.27%) → hsl(344 100% 46%)
HWB
hwb(344 0% 7%)
OKLCH
oklch(0.597 0.240 19.7) · oklch(59.7% 0.240 19.7)
OKLab
oklab(0.597 0.226 0.081)
Lab (D50)
lab(50.65 77.01 37.86)
LCH (D50)
lch(50.65 85.81 26.18)
Display P3
color(display-p3 0.8488 0.1823 0.2708)
Linear sRGB
color(srgb-linear 0.8388 0.0000 0.0497)

Gamut: sRGB and Display P3

#EC003F is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.240 and Display P3 reaches 0.270; this color uses 100% of the sRGB chroma available.

CSS snippets

.element {
  color: #ec003f;
  color: rgb(236 0 63);
  color: hsl(344 100% 46%);
  color: oklch(0.597 0.240 19.7);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.597 0.240 19.7);
}
/* arbitrary values */
class="text-[#ec003f] bg-[oklch(0.597_0.240_19.7)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.8488 0.1823 0.2708); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #ec003f 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

  • #FF3051 · oklch(0.657 0.240 19.7) · ΔL +0.06
  • #D6002D · oklch(0.537 0.240 19.7) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?