#AFA228#AFA228

#AFA228 is a light, vivid yellow. Relative luminance 0.351; OKLCH L 70.3% C 0.135 H 103.0°. Best body text is #000000 at 8.02:1 contrast (WCAG AA passes).

Color values

HEX#AFA228
RGBrgb(175, 162, 40)
HSLhsl(54, 63%, 42%)
HSVhsv(54, 77%, 69%)
CMYKcmyk(0%, 7.4%, 77.1%, 31.4%)
CIE-LABlab(65.83, -8.62, 60.40)
CIE-LCHlch(65.83, 61.01, 98.12°)
OKLaboklab(70.25% -0.0304 0.1319)
OKLCHoklch(70.25% 0.135 103)
XYZxyz(30.9840, 35.1092, 7.1518)
Luminance0.3511 (WCAG relative)
Temperaturewarm
Familyyellow

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AFA228 #2835AF
analogous
#AF5E28 #AFA228 #79AF28
triadic
#AFA228 #28AFA2 #A228AF
tetradic
#AFA228 #28AF5E #2835AF #AF2879
square
#AFA228 #28AF5E #2835AF #AF2879
split-complementary
#AFA228 #2879AF #5E28AF
monochromatic
#4B4611 #7D741D #AFA228 #D4C541 #DFD473

Accessibility & contrast

On white

2.62
#AFA228 on #FFFFFF
AA ✗AA large ✗AAA ✗

On black

8.02
#AFA228 on #000000
AA ✓AA large ✓AAA ✓

Best text color

#000000 on #AFA228
8.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AFA228#FFFFFF#000000##000000
##AFA2281.002.628.028.02
#FFFFFF2.621.0021.0021.00
#0000008.0221.001.001.00
##0000008.0221.001.001.00

Color blindness preview

Protanopia (red-blind)
#B19D0B
Deuteranopia (green-blind)
#B5A331
Tritanopia (blue-blind)
#BD968B
Achromatopsia (no color)
#A0A0A0

Design tokens & code

CSS
--color: #afa228;
/* rgb */ color: rgb(175, 162, 40);
/* oklch */ color: oklch(70.3% 0.135 103.0);
Tailwind
colors: {
  custom: {
    50: '#cbbd6c',
    500: '#afa228',
    950: '#000000',
  },
}
SCSS
$custom: #afa228;
$custom-light: #cbbd6c;
$custom-dark: #000000;
JSON
{
  "hex": "#afa228",
  "rgb": {
    "r": 175,
    "g": 162,
    "b": 40
  },
  "hsl": {
    "h": 54.222,
    "s": 62.791,
    "l": 42.157
  },
  "oklch": {
    "l": 0.70252,
    "c": 0.13539,
    "h": 103
  },
  "luminance": 0.35108
}

Semantic roles & 50–950 ramp

primary
#AFA228
secondary
#6D75C6
accent
#52E642
background
#FCFBF6
surface
#F9F6EC
border
#D2D0C7
text
#141207
muted
#82817A

Preview Lab

Preview with #AFA228

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

Preview Lab → · Contrast checker → · Palette generator →

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