RGB to HEX: #D97706

Also known as: Tailwind v3 amber-600

Result

rgb(217 119 6) → #D97706

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. base 10 → base 16

    R = 217 = 13×16 + 9 → D9
    G = 119 = 7×16 + 7 → 77
    B = 6 = 0×16 + 6 → 06
  2. 2. pairs → HEX

    D9 77 06 → #D97706

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?