#AFA840#AFA840

#AFA840 is a light, vivid yellow. Relative luminance 0.375; OKLCH L 71.7% C 0.125 H 105.5°. Best body text is #000000 at 8.50:1 contrast (WCAG AA passes).

Color values

HEX#AFA840
RGBrgb(175, 168, 64)
HSLhsl(56, 46%, 47%)
HSVhsv(56, 63%, 69%)
CMYKcmyk(0%, 4%, 63.4%, 31.4%)
CIE-LABlab(67.64, -10.51, 52.88)
CIE-LCHlch(67.64, 53.92, 101.24°)
OKLaboklab(71.75% -0.0332 0.1203)
OKLCHoklch(71.75% 0.125 105.5)
XYZxyz(32.6084, 37.4905, 10.3682)
Luminance0.3749 (WCAG relative)
Temperaturewarm
Familyyellow

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AFA840 #4047AF
analogous
#AF7140 #AFA840 #7FAF40
triadic
#AFA840 #40AFA8 #A840AF
tetradic
#AFA840 #40AF71 #4047AF #AF407F
square
#AFA840 #40AF71 #4047AF #AF407F
split-complementary
#AFA840 #407FAF #7140AF
monochromatic
#55521F #827D30 #AFA840 #C7C165 #D7D392

Accessibility & contrast

On white

2.47
#AFA840 on #FFFFFF
AA ✗AA large ✗AAA ✗

On black

8.50
#AFA840 on #000000
AA ✓AA large ✓AAA ✓

Best text color

#000000 on #AFA840
8.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AFA840#FFFFFF#000000##000000
##AFA8401.002.478.508.50
#FFFFFF2.471.0021.0021.00
#0000008.5021.001.001.00
##0000008.5021.001.001.00

Color blindness preview

Protanopia (red-blind)
#B6A233
Deuteranopia (green-blind)
#B9A746
Tritanopia (blue-blind)
#BB9D92
Achromatopsia (no color)
#A5A5A5

Design tokens & code

CSS
--color: #afa840;
/* rgb */ color: rgb(175, 168, 64);
/* oklch */ color: oklch(71.7% 0.125 105.5);
Tailwind
colors: {
  custom: {
    50: '#cac17a',
    500: '#afa840',
    950: '#000000',
  },
}
SCSS
$custom: #afa840;
$custom-light: #cac17a;
$custom-dark: #000000;
JSON
{
  "hex": "#afa840",
  "rgb": {
    "r": 175,
    "g": 168,
    "b": 64
  },
  "hsl": {
    "h": 56.216,
    "s": 46.444,
    "l": 46.863
  },
  "oklch": {
    "l": 0.71745,
    "c": 0.12477,
    "h": 105.5
  },
  "luminance": 0.37489
}

Semantic roles & 50–950 ramp

primary
#AFA840
secondary
#888CC3
accent
#5AD652
background
#FCFBF7
surface
#F9F7EE
border
#D2D0C9
text
#141209
muted
#82817B

Preview Lab

Preview with #AFA840

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

Preview Lab → · Contrast checker → · Palette generator →

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