#D8C040#D8C040

#D8C040 is a light, vivid yellow. Relative luminance 0.527; OKLCH L 80.6% C 0.145 H 98.4°. Best body text is #000000 at 11.53:1 contrast (WCAG AA passes).

Color values

HEX#D8C040
RGBrgb(216, 192, 64)
HSLhsl(51, 66%, 55%)
HSVhsv(51, 70%, 85%)
CMYKcmyk(0%, 11.1%, 70.4%, 15.3%)
CIE-LABlab(77.68, -5.36, 64.36)
CIE-LCHlch(77.68, 64.58, 94.76°)
OKLaboklab(80.58% -0.021 0.1432)
OKLCHoklch(80.58% 0.145 98.4)
XYZxyz(48.0962, 52.6707, 12.4826)
Luminance0.5267 (WCAG relative)
Temperaturewarm
Familyyellow

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#D8C040 #4058D8
analogous
#D87440 #D8C040 #A4D840
triadic
#D8C040 #40D8C0 #C040D8
tetradic
#D8C040 #40D874 #4058D8 #D840A4
square
#D8C040 #40D874 #4058D8 #D840A4
split-complementary
#D8C040 #40A4D8 #7440D8
monochromatic
#83721B #B69F25 #D8C040 #E2D173 #EDE2A6

Accessibility & contrast

On white

1.82
#D8C040 on #FFFFFF
AA ✗AA large ✗AAA ✗

On black

11.53
#D8C040 on #000000
AA ✓AA large ✓AAA ✓

Best text color

#000000 on #D8C040
11.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##D8C040#FFFFFF#000000##000000
##D8C0401.001.8211.5311.53
#FFFFFF1.821.0021.0021.00
#00000011.5321.001.001.00
##00000011.5321.001.001.00

Color blindness preview

Protanopia (red-blind)
#D3BB2D
Deuteranopia (green-blind)
#D9C448
Tritanopia (blue-blind)
#E9B2A6
Achromatopsia (no color)
#C0C0C0

Design tokens & code

CSS
--color: #d8c040;
/* rgb */ color: rgb(216, 192, 64);
/* oklch */ color: oklch(80.6% 0.145 98.4);
Tailwind
colors: {
  custom: {
    50: '#e8d27c',
    500: '#d8c040',
    950: '#000000',
  },
}
SCSS
$custom: #d8c040;
$custom-light: #e8d27c;
$custom-dark: #000000;
JSON
{
  "hex": "#d8c040",
  "rgb": {
    "r": 216,
    "g": 192,
    "b": 64
  },
  "hsl": {
    "h": 50.526,
    "s": 66.087,
    "l": 54.902
  },
  "oklch": {
    "l": 0.80579,
    "c": 0.14478,
    "h": 98.4
  },
  "luminance": 0.52668
}

Semantic roles & 50–950 ramp

primary
#D8C040
secondary
#33408A
accent
#5AE93F
background
#FFFEFB
surface
#FEFBF2
border
#D6D4CC
text
#17140A
muted
#85837D

Preview Lab

Preview with #D8C040

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#D8C040 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva