#AFA842#AFA842

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

Color values

HEX#AFA842
RGBrgb(175, 168, 66)
HSLhsl(56, 45%, 47%)
HSVhsv(56, 62%, 69%)
CMYKcmyk(0%, 4%, 62.3%, 31.4%)
CIE-LABlab(67.66, -10.37, 52.03)
CIE-LCHlch(67.66, 53.05, 101.28°)
OKLaboklab(71.76% -0.0326 0.1187)
OKLCHoklch(71.76% 0.123 105.4)
XYZxyz(32.6663, 37.5137, 10.6733)
Luminance0.3751 (WCAG relative)
Temperaturewarm
Familyyellow

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AFA842 #4249AF
analogous
#AF7242 #AFA842 #7FAF42
triadic
#AFA842 #42AFA8 #A842AF
tetradic
#AFA842 #42AF72 #4249AF #AF427F
square
#AFA842 #42AF72 #4249AF #AF427F
split-complementary
#AFA842 #427FAF #7242AF
monochromatic
#565320 #837D31 #AFA842 #C6C068 #D7D395

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##AFA842#FFFFFF#000000##000000
##AFA8421.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)
#B6A236
Deuteranopia (green-blind)
#B8A748
Tritanopia (blue-blind)
#BB9D92
Achromatopsia (no color)
#A5A5A5

Design tokens & code

CSS
--color: #afa842;
/* rgb */ color: rgb(175, 168, 66);
/* oklch */ color: oklch(71.8% 0.123 105.4);
Tailwind
colors: {
  custom: {
    50: '#cac17b',
    500: '#afa842',
    950: '#000000',
  },
}
SCSS
$custom: #afa842;
$custom-light: #cac17b;
$custom-dark: #000000;
JSON
{
  "hex": "#afa842",
  "rgb": {
    "r": 175,
    "g": 168,
    "b": 66
  },
  "hsl": {
    "h": 56.147,
    "s": 45.228,
    "l": 47.255
  },
  "oklch": {
    "l": 0.71764,
    "c": 0.12315,
    "h": 105.4
  },
  "luminance": 0.37513
}

Semantic roles & 50–950 ramp

primary
#AFA842
secondary
#8A8EC2
accent
#5BD553
background
#FCFBF7
surface
#F9F7EE
border
#D2D0C9
text
#14120A
muted
#82817C

Preview Lab

Preview with #AFA842

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

Preview Lab → · Contrast checker → · Palette generator →

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