HSL to HEX: #7E2A0C

Also known as: Tailwind orange-900

Result

hsl(15.79 82.61% 27.06%) → #7E2A0C

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

    H = 15.79°, S = 82.61%, L = 27.06%
  2. 2. C

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

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

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

    (R′, G′, B′) = (0.44709, 0.11766, 0.00000)
    R = round((0.44709 + 0.04706) × 255) = 126
    G = round((0.11766 + 0.04706) × 255) = 42
    B = round((0.00000 + 0.04706) × 255) = 12
  6. 6. RGB → HEX

    #7E2A0C

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?