HEX to RGB: #7E2A0C

Also known as: Tailwind orange-900

Result

#7E2A0C → rgb(126 42 12)

Values are shown at full precision, so converting back gives exactly #7e2a0c. 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. HEX → pairs

    #7E2A0C → 7E | 2A | 0C
  2. 2. base 16 → base 10

    R = 7E₁₆ = 7×16 + 14 = 126
    G = 2A₁₆ = 2×16 + 10 = 42
    B = 0C₁₆ = 0×16 + 12 = 12
  3. 3. RGB

    rgb(126 42 12)

All formats

HEX
#7e2a0c
RGB
rgb(126 42 12)
RGB (legacy)
rgb(126, 42, 12)
HSL
hsl(15.79 82.61% 27.06%) → hsl(16 83% 27%)
HWB
hwb(16 5% 51%)
OKLCH
oklch(0.407 0.123 38.0) · oklch(40.7% 0.123 38.0)
OKLab
oklab(0.407 0.097 0.076)
Lab (D50)
lab(30.22 36.03 37.43)
LCH (D50)
lch(30.22 51.96 46.09)
Display P3
color(display-p3 0.4562 0.1874 0.0903)
Linear sRGB
color(srgb-linear 0.2086 0.0232 0.0037)

Gamut: sRGB and Display P3

#7E2A0C is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.133 and Display P3 reaches 0.150; this color uses 92% of the sRGB chroma available.

CSS snippets

.element {
  color: #7e2a0c;
  color: rgb(126 42 12);
  color: hsl(16 83% 27%);
  color: oklch(0.407 0.123 38.0);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.407 0.123 38.0);
}
/* arbitrary values */
class="text-[#7e2a0c] bg-[oklch(0.407_0.123_38.0)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.4562 0.1874 0.0903); }
}

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

  • #913C20 · oklch(0.467 0.123 38.0) · ΔL +0.06
  • #6B1700 · oklch(0.347 0.123 38.0) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?