#AFAB31#AFAB31

#AFAB31 is a light, vivid yellow. Relative luminance 0.385; OKLCH L 72.3% C 0.138 H 107.5°. Best body text is #000000 at 8.69:1 contrast (WCAG AA passes).

Color values

HEX#AFAB31
RGBrgb(175, 171, 49)
HSLhsl(58, 56%, 44%)
HSVhsv(58, 72%, 69%)
CMYKcmyk(0%, 2.3%, 72%, 31.4%)
CIE-LABlab(68.36, -12.92, 59.63)
CIE-LCHlch(68.36, 61.02, 102.22°)
OKLaboklab(72.28% -0.0417 0.132)
OKLCHoklch(72.28% 0.138 107.5)
XYZxyz(32.7977, 38.4626, 8.6015)
Luminance0.3846 (WCAG relative)
Temperaturewarm
Familyyellow

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AFAB31 #3135AF
analogous
#AF6C31 #AFAB31 #74AF31
triadic
#AFAB31 #31AFAB #AB31AF
tetradic
#AFAB31 #31AF6C #3135AF #AF3174
square
#AFAB31 #31AF6C #3135AF #AF3174
split-complementary
#AFAB31 #3174AF #6C31AF
monochromatic
#4F4E16 #7F7C24 #AFAB31 #CECA4F #DBD87F

Accessibility & contrast

On white

2.42
#AFAB31 on #FFFFFF
AA ✗AA large ✗AAA ✗

On black

8.69
#AFAB31 on #000000
AA ✓AA large ✓AAA ✓

Best text color

#000000 on #AFAB31
8.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AFAB31#FFFFFF#000000##000000
##AFAB311.002.428.698.69
#FFFFFF2.421.0021.0021.00
#0000008.6921.001.001.00
##0000008.6921.001.001.00

Color blindness preview

Protanopia (red-blind)
#B9A41B
Deuteranopia (green-blind)
#BCA93A
Tritanopia (blue-blind)
#BCA093
Achromatopsia (no color)
#A7A7A7

Design tokens & code

CSS
--color: #afab31;
/* rgb */ color: rgb(175, 171, 49);
/* oklch */ color: oklch(72.3% 0.138 107.5);
Tailwind
colors: {
  custom: {
    50: '#cac372',
    500: '#afab31',
    950: '#000000',
  },
}
SCSS
$custom: #afab31;
$custom-light: #cac372;
$custom-dark: #000000;
JSON
{
  "hex": "#afab31",
  "rgb": {
    "r": 175,
    "g": 171,
    "b": 49
  },
  "hsl": {
    "h": 58.095,
    "s": 56.25,
    "l": 43.922
  },
  "oklch": {
    "l": 0.72281,
    "c": 0.13842,
    "h": 107.5
  },
  "luminance": 0.38462
}

Semantic roles & 50–950 ramp

primary
#AFAB31
secondary
#787AC4
accent
#4DE048
background
#FCFBF7
surface
#F9F7ED
border
#D2D0C8
text
#141208
muted
#82817B

Preview Lab

Preview with #AFAB31

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

Preview Lab → · Contrast checker → · Palette generator →

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