RGB to HEX: #DC2626

Also known as: Tailwind v3 red-600

Result

rgb(220 38 38) → #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. base 10 → base 16

    R = 220 = 13×16 + 12 → DC
    G = 38 = 2×16 + 6 → 26
    B = 38 = 2×16 + 6 → 26
  2. 2. pairs → HEX

    DC 26 26 → #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?