HEX to HSL: #D97706

Also known as: Tailwind v3 amber-600

Result

#D97706 → hsl(32 95% 44%)

Values are shown at full precision, so converting back gives exactly #d97706. 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. RGB ÷ 255

    R = 0.8510
    G = 0.4667
    B = 0.0235
  2. 2. max, min, Δ

    max = 0.8510
    min = 0.0235
    Δ = max − min = 0.8275
  3. 3. L

    L = (max + min) / 2 = 0.4373 = 43.73%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.9462 = 94.62%
  5. 5. H

    max is R → H = 60° × (((G − B) / Δ) mod 6) = 60° × (((0.4667 − 0.0235) / 0.8275) mod 6) = 32.13°
  6. 6. HSL

    hsl(32.13 94.62% 43.73%)

All formats

HEX
#d97706
RGB
rgb(217 119 6)
RGB (legacy)
rgb(217, 119, 6)
HSL
hsl(32.13 94.62% 43.73%) → hsl(32 95% 44%)
HWB
hwb(32 2% 15%)
OKLCH
oklch(0.666 0.157 58.3) · oklch(66.6% 0.157 58.3)
OKLab
oklab(0.666 0.083 0.134)
Lab (D50)
lab(60.49 34.89 66.47)
LCH (D50)
lch(60.49 75.07 62.31)
Display P3
color(display-p3 0.7998 0.4861 0.1788)
Linear sRGB
color(srgb-linear 0.6939 0.1845 0.0018)

Gamut: sRGB and Display P3

#D97706 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.159 and Display P3 reaches 0.181; this color uses 99% of the sRGB chroma available.

CSS snippets

.element {
  color: #d97706;
  color: rgb(217 119 6);
  color: hsl(32 95% 44%);
  color: oklch(0.666 0.157 58.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.666 0.157 58.3);
}
/* arbitrary values */
class="text-[#d97706] bg-[oklch(0.666_0.157_58.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.7998 0.4861 0.1788); }
}

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

  • #EE8A2C · oklch(0.726 0.157 58.3) · ΔL +0.06
  • #C56400 · oklch(0.606 0.157 58.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?