#AF21A5#AF21A5

#AF21A5 is a mid, highly saturated purple. Relative luminance 0.129; OKLCH L 53.5% C 0.220 H 331.5°. Best body text is #FFFFFF at 5.86:1 contrast (WCAG AA passes).

Color values

HEX#AF21A5
RGBrgb(175, 33, 165)
HSLhsl(304, 68%, 41%)
HSVhsv(304, 81%, 69%)
CMYKcmyk(0%, 81.1%, 5.7%, 31.4%)
CIE-LABlab(42.64, 67.65, -38.16)
CIE-LCHlch(42.64, 77.67, 330.57°)
OKLaboklab(53.49% 0.1935 -0.1053)
OKLCHoklch(53.49% 0.22 331.5)
XYZxyz(25.0146, 12.9204, 36.7664)
Luminance0.1292 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF21A5 #21AF2B
analogous
#7221AF #AF21A5 #AF215E
triadic
#AF21A5 #A5AF21 #21A5AF
tetradic
#AF21A5 #AF7221 #21AF2B #215EAF
square
#AF21A5 #AF7221 #21AF2B #215EAF
split-complementary
#AF21A5 #5EAF21 #21AF72
monochromatic
#480E44 #7C1774 #AF21A5 #D934CD #E368DA

Accessibility & contrast

On white

5.86
#AF21A5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.58
#AF21A5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF21A5
5.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF21A5#FFFFFF#000000##FFFFFF
##AF21A51.005.863.585.86
#FFFFFF5.861.0021.001.00
#0000003.5821.001.0021.00
##FFFFFF5.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0E58A8
Deuteranopia (green-blind)
#526BA2
Tritanopia (blue-blind)
#B63564
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #af21a5;
/* rgb */ color: rgb(175, 33, 165);
/* oklch */ color: oklch(53.5% 0.220 331.5);
Tailwind
colors: {
  custom: {
    50: '#cb6fc0',
    500: '#af21a5',
    950: '#000000',
  },
}
SCSS
$custom: #af21a5;
$custom-light: #cb6fc0;
$custom-dark: #000000;
JSON
{
  "hex": "#af21a5",
  "rgb": {
    "r": 175,
    "g": 33,
    "b": 165
  },
  "hsl": {
    "h": 304.225,
    "s": 68.269,
    "l": 40.784
  },
  "oklch": {
    "l": 0.53493,
    "c": 0.22027,
    "h": 331.5
  },
  "luminance": 0.12918
}

Semantic roles & 50–950 ramp

primary
#AF21A5
secondary
#64C86B
accent
#EB493D
background
#FDF7FB
surface
#FAEDF7
border
#D3C8D0
text
#140912
muted
#837B81

Preview Lab

Preview with #AF21A5

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

Preview Lab → · Contrast checker → · Palette generator →

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