RGB to HEX: #BDB76B

Also known as: CSS darkkhaki

Result

rgb(189 183 107) → #BDB76B

Values are shown at full precision, so converting back gives exactly #bdb76b. 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 = 189 = 11×16 + 13 → BD
    G = 183 = 11×16 + 7 → B7
    B = 107 = 6×16 + 11 → 6B
  2. 2. pairs → HEX

    BD B7 6B → #BDB76B

All formats

HEX
#bdb76b
RGB
rgb(189 183 107)
RGB (legacy)
rgb(189, 183, 107)
HSL
hsl(55.61 38.32% 58.04%) → hsl(56 38% 58%)
HWB
hwb(56 42% 26%)
OKLCH
oklch(0.767 0.098 104.5) · oklch(76.7% 0.098 104.5)
OKLab
oklab(0.767 -0.025 0.095)
Lab (D50)
lab(73.65 -5.82 39.28)
LCH (D50)
lch(73.65 39.71 98.42)
Display P3
color(display-p3 0.7371 0.7184 0.4576)
Linear sRGB
color(srgb-linear 0.5089 0.4735 0.1470)

Gamut: sRGB and Display P3

#BDB76B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.162 and Display P3 reaches 0.188; this color uses 60% of the sRGB chroma available.

CSS snippets

.element {
  color: #bdb76b;
  color: rgb(189 183 107);
  color: hsl(56 38% 58%);
  color: oklch(0.767 0.098 104.5);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.767 0.098 104.5);
}
/* arbitrary values */
class="text-[#bdb76b] bg-[oklch(0.767_0.098_104.5)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.7371 0.7184 0.4576); }
}

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

  • #D0CA7E · oklch(0.827 0.098 104.5) · ΔL +0.06
  • #AAA458 · oklch(0.707 0.098 104.5) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?