CSS named color

Dark Khaki #BDB76B

The CSS keyword darkkhaki is #BDB76B. It is a light muted yellow in the yellow family. In OKLCH it sits at lightness 0.767, chroma 0.098 and hue 104.5°.

Relative luminance
0.4575
OKLCH L · C · h
0.767 · 0.098 · 104.5
Best text
Black 10.14:1
Hue family
Yellow

#BDB76B color codes

HEX
#BDB76B
RGB
rgb(189, 183, 107)
HSL
hsl(56, 38%, 58%)
OKLCH
oklch(0.767 0.098 104.5)
OKLab
oklab(0.767 -0.025 0.095)
CIELAB (D65)
L* 73.38, a* -8.79, b* 39.29
XYZ (D65)
X 40.57, Y 45.75, Z 20.60
CMYK (naive)
cmyk(0%, 3%, 43%, 26%)

CIELAB and XYZ use the D65 white point; CSS lab() uses D50, so paste the OKLCH or HEX value into stylesheets. CMYK here is a plain formula with no press profile.

Legibility

Contrast: is #BDB76B accessible?

Black text on it reaches 10.14:1, passing AAA. White text fails at 2.06:1.

WCAG 2 gives the same ratio whichever color is the text; APCA does not, so its Lc changes sign and size with polarity.

Open the Contrast System
  • Black text on it

    10.14:1

    • AA passes
    • AA large passes
    • AAA passes
    • APCA Lc +63
  • White text on it

    2.06:1

    • AA fails
    • AA large fails
    • AAA fails
    • APCA Lc −44
  • As text on black

    10.14:1

    • AA passes
    • AA large passes
    • AAA passes
    • APCA Lc −61
  • As text on white

    2.06:1

    • AA fails
    • AA large fails
    • AAA fails
    • APCA Lc +40

Nearest versions that pass 4.5:1

  • For text on white

    #7E782B 4.55:1

    Darkening its OKLCH lightness from 0.77 to 0.56 reaches 4.55:1 on white, keeping the hue.

  • For text on black

    #BDB76B 10.14:1

    It already reaches 10.14:1 on black, so no change is needed.

Checking another pair? Use the Contrast Checker.

Studio

Adjust #BDB76B live

Move lightness, chroma and hue in OKLCH, or drag on the map. The map is every lightness and chroma at the current hue: sRGB inside the solid area, Display P3 out to the dashed line.

The studio needs JavaScript.

Scale

Shades and tints of #BDB76B

Eleven OKLCH lightness steps at this hue, each with its contrast against white and black. #BDB76B sits at step 300.

  1. 50#FDF9BC
    White
    1.07
    Black
    19.45
  2. 100#F3EFB0
    White
    1.18
    Black
    17.78
  3. 200#E0DB98
    White
    1.42
    Black
    14.75
  4. 300This color#BDB76B
    White
    2.06
    Black
    10.14
  5. 400#ABA55B
    White
    2.54
    Black
    8.26
  6. 500#8F893D
    White
    3.61
    Black
    5.81
  7. 600#787124
    White
    5.01
    Black
    4.18
  8. 700#615A05
    White
    7.06
    Black
    2.97
  9. 800#474100
    White
    10.37
    Black
    2.02
  10. 900#2E2A00
    White
    14.50
    Black
    1.44
  11. 950#191700
    White
    18.04
    Black
    1.16

Under each step, white and black text on it; a bold figure passes 4.5:1.

Gamut

How vivid #BDB76B can get

At its lightness and hue, sRGB reaches OKLCH chroma 0.163; #BDB76B uses 60% of it. Display P3, which many recent phones and laptops show, reaches 0.188 there: 16% more.

0.00.20.40.60.80.20.40.60.8 460480500520540560580600620
  • sRGB
  • Display P3
  • Rec. 2020
  • Dominant wavelength
OKLCH chroma
0.098
sRGB edge
0.163
Display P3 edge
0.188
Rec. 2020 edge
0.193
Dominant wavelength
572 nm
Excitation purity
46%
Chromaticity
x 0.3795, y 0.4279
  • This color#BDB76B
  • Most vivid in sRGB#C4B800
  • Most vivid in Display P3oklch(0.767 0.188 104.5)

On a screen without Display P3 the last tile shows the sRGB edge instead.

Use the wider color where screens show it
.accent {
  color: #bdb76b;
}
@media (color-gamut: p3) {
  .accent { color: color(display-p3 0.7718 0.7214 0); }
}

Mixing

Mixing #BDB76B

Each row is the same mix worked out in a different space, with the halfway color at its end. sRGB, which older CSS gradients use, can sag gray or dark in the middle; OKLab keeps the lightness steps even; OKLCH holds chroma and hue as it goes.

White #FFFFFF

  • sRGB50%#DEDBB5
  • OKLab50%#DDDBB6
  • OKLCH50%#DDDBB6

Black #000000

  • sRGB50%#5F5C36
  • OKLab50%#474525
  • OKLCH50%#474525

Its complement #ACABF0

  • sRGB50%#B5B1AE
  • OKLab50%#B3B3B3
  • OKLCH50%#5DC7C6
In CSS
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #bdb76b, white);
color: color-mix(in oklch, #bdb76b 50%, white);

In use

#BDB76B in an interface

A button, a link, a heading, a focused field, an icon and a chart line in this color, on a light page and a dark one. Each check is a WCAG 2 contrast minimum: 1.4.3 for text, 1.4.11 for the rest.

Light page

  • Button labelText, 4.5:110.14:1 Passes
  • Link and body-size textText, 4.5:12.06:1 Fails
  • Large headingLarge text, 3:12.06:1 Fails
  • Icons, borders and focus ringsNon-text, 3:12.06:1 Fails

For text on this page, the nearest shade that passes is #7E782B 4.55:1

Dark page

  • Button labelText, 4.5:110.14:1 Passes
  • Link and body-size textText, 4.5:19.05:1 Passes
  • Large headingLarge text, 3:19.05:1 Passes
  • Icons, borders and focus ringsNon-text, 3:19.05:1 Passes

Color vision

How #BDB76B looks with color blindness

Tritanopia changes it most, ΔE2000 22.7; deuteranopia changes it least, 2.8.

Simulated with Machado et al. (2009) at full severity, in linear light.

Simulate a whole page What each type sees
  • Protanopia

    No working red (long-wavelength) cones

    #C3B265 ΔE2000 3.4

    Close match

    Reads as light muted amber

  • Deuteranopia

    No working green (medium-wavelength) cones

    #C5B66E ΔE2000 2.8

    Close match

    Reads as light muted amber

  • Tritanopia

    No working blue (short-wavelength) cones

    #C8AEA5 ΔE2000 22.7

    Distinct

    Reads as light grayish red

  • Achromatopsia

    No cone color vision; lightness only

    #B4B4B4 ΔE2000 21.3

    Distinct

    Reads as light gray

Pairing check

Checked against its complement, #ACABF0. Their lightness contrast is only 1.03:1, so where hue collapses, add a label, icon or pattern.

VisionThe pairΔE2000Verdict
Normal vision#BDB76B · #ACABF049.3Stays distinct
Protanopia#C3B265 · #98B4F345.4Stays distinct
Deuteranopia#C5B66E · #96AFEE44.8Stays distinct
Tritanopia#C8AEA5 · #9CB7C324.1Stays distinct
Achromatopsia#B4B4B4 · #B1B1B10.8Easily confused

Harmony

Color harmonies for #BDB76B

Its complement is #ACABF0, a light muted blue, on the cool side of the wheel.

Hue rotations in OKLCH, mapped into sRGB by trimming chroma so hue and lightness stay put.

Open the Harmony Studio
  • Base#BDB76B
  • Complement#ACABF0

Complementary

Open in Harmony Studio
  • −30°#D9AA6A
  • Base#BDB76B
  • +30°#99C282
  • Base#BDB76B
  • +120°#67C1E2
  • +240°#E19AC2
  • Base#BDB76B
  • +150°#88B7F1
  • +210°#CBA1DF

Split-complementary

Open in Harmony Studio

Code

Design tokens

Ready-to-paste tokens in six formats. Rename them to fit your system.

CSS custom property

:root {
  --color-darkkhaki: #bdb76b;
}

Tailwind config

// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: {
        darkkhaki: '#bdb76b',
      },
    },
  },
};

Tailwind v4 theme

/* app.css — Tailwind CSS v4 */
@import "tailwindcss";

@theme {
  --color-darkkhaki: oklch(0.767 0.098 104.5);
}

Design token (W3C DTCG)

{
  "color": {
    "darkkhaki": {
      "$type": "color",
      "$value": {
        "colorSpace": "srgb",
        "components": [0.7412, 0.7176, 0.4196],
        "hex": "#bdb76b"
      },
      "$description": "CSS named color darkkhaki"
    }
  }
}

SwiftUI color

import SwiftUI

enum Palette {
    static let darkkhaki = Color(.sRGB, red: 0.741, green: 0.718, blue: 0.420, opacity: 1)
}

Jetpack Compose color

import androidx.compose.ui.graphics.Color

object Palette {
    val Darkkhaki = Color(0xFFBDB76B)
}

Matches

The nearest match in each system

The closest CSS name, Tailwind shade, RAL Classic paint and Crayola crayon by ΔE2000; under 2 is hard to tell apart side by side. RAL and Crayola values approximate physical colors.

Tools

Open #BDB76B in the tools

Each opens over this page. More colors live in the Color Library, and every color page is listed on the hub.