HSL to HEX: #DC2626

Also known as: Tailwind v3 red-600

Result

hsl(0.00 72.22% 50.59%) → #DC2626

Values are shown at full precision, so converting back gives exactly #dc2626. 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 = 0.00°, S = 72.22%, L = 50.59%
  2. 2. C

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

    X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.00000   (H / 60° = 0.0000, sector 0)
  4. 4. m

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

    (R′, G′, B′) = (0.71368, 0.00000, 0.00000)
    R = round((0.71368 + 0.14906) × 255) = 220
    G = round((0.00000 + 0.14906) × 255) = 38
    B = round((0.00000 + 0.14906) × 255) = 38
  6. 6. RGB → HEX

    #DC2626

All formats

HEX
#dc2626
RGB
rgb(220 38 38)
RGB (legacy)
rgb(220, 38, 38)
HSL
hsl(0.00 72.22% 50.59%) → hsl(0 72% 51%)
HWB
hwb(0 15% 14%)
OKLCH
oklch(0.577 0.215 27.3) · oklch(57.7% 0.215 27.3)
OKLab
oklab(0.577 0.191 0.099)
Lab (D50)
lab(48.80 67.70 48.80)
LCH (D50)
lch(48.80 83.46 35.79)
Display P3
color(display-p3 0.7930 0.2280 0.1940)
Linear sRGB
color(srgb-linear 0.7157 0.0194 0.0194)

Gamut: sRGB and Display P3

#DC2626 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.235 and Display P3 reaches 0.265; this color uses 91% of the sRGB chroma available.

CSS snippets

.element {
  color: #dc2626;
  color: rgb(220 38 38);
  color: hsl(0 72% 51%);
  color: oklch(0.577 0.215 27.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.577 0.215 27.3);
}
/* arbitrary values */
class="text-[#dc2626] bg-[oklch(0.577_0.215_27.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.7930 0.2280 0.1940); }
}

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

  • #F2403A · oklch(0.637 0.215 27.3) · ΔL +0.06
  • #C6000D · oklch(0.517 0.215 27.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?