HSL to HEX: #7B3306

Also known as: Tailwind amber-900

Result

hsl(23.08 90.70% 25.29%) → #7B3306

Values are shown at full precision, so converting back gives exactly #7b3306. 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 = 23.08°, S = 90.70%, L = 25.29%
  2. 2. C

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

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

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

    (R′, G′, B′) = (0.45876, 0.17647, 0.00000)
    R = round((0.45876 + 0.02352) × 255) = 123
    G = round((0.17647 + 0.02352) × 255) = 51
    B = round((0.00000 + 0.02352) × 255) = 6
  6. 6. RGB → HEX

    #7B3306

All formats

HEX
#7b3306
RGB
rgb(123 51 6)
RGB (legacy)
rgb(123, 51, 6)
HSL
hsl(23.08 90.70% 25.29%) → hsl(23 91% 25%)
HWB
hwb(23 2% 52%)
OKLCH
oklch(0.415 0.113 45.9) · oklch(41.5% 0.113 45.9)
OKLab
oklab(0.415 0.078 0.081)
Lab (D50)
lab(31.33 30.43 40.29)
LCH (D50)
lch(31.33 50.49 52.93)
Display P3
color(display-p3 0.4477 0.2168 0.0819)
Linear sRGB
color(srgb-linear 0.1981 0.0331 0.0018)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #7b3306;
  color: rgb(123 51 6);
  color: hsl(23 91% 25%);
  color: oklch(0.415 0.113 45.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.415 0.113 45.9);
}
/* arbitrary values */
class="text-[#7b3306] bg-[oklch(0.415_0.113_45.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.4477 0.2168 0.0819); }
}

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

  • #8E441D · oklch(0.475 0.113 45.9) · ΔL +0.06
  • #682200 · oklch(0.355 0.113 45.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?