#AF42AC#AF42AC

#AF42AC is a mid, vivid purple. Relative luminance 0.160; OKLCH L 56.7% C 0.189 H 328.8°. Best body text is #FFFFFF at 5.00:1 contrast (WCAG AA passes).

Color values

HEX#AF42AC
RGBrgb(175, 66, 172)
HSLhsl(302, 45%, 47%)
HSVhsv(302, 62%, 69%)
CMYKcmyk(0%, 62.3%, 1.7%, 31.4%)
CIE-LABlab(46.96, 57.59, -35.49)
CIE-LCHlch(46.96, 67.65, 328.35°)
OKLaboklab(56.72% 0.1616 -0.0978)
OKLCHoklch(56.72% 0.189 328.8)
XYZxyz(27.0735, 15.9908, 40.6823)
Luminance0.1599 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF42AC #42AF45
analogous
#7B42AF #AF42AC #AF4276
triadic
#AF42AC #ACAF42 #42ACAF
tetradic
#AF42AC #AF7B42 #42AF45 #4276AF
square
#AF42AC #AF7B42 #42AF45 #4276AF
split-complementary
#AF42AC #76AF42 #42AF7B
monochromatic
#562055 #833180 #AF42AC #C668C4 #D795D5

Accessibility & contrast

On white

5.00
#AF42AC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.20
#AF42AC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF42AC
5.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF42AC#FFFFFF#000000##FFFFFF
##AF42AC1.005.004.205.00
#FFFFFF5.001.0021.001.00
#0000004.2021.001.0021.00
##FFFFFF5.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3766AF
Deuteranopia (green-blind)
#5D75A9
Tritanopia (blue-blind)
#B54F71
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #af42ac;
/* rgb */ color: rgb(175, 66, 172);
/* oklch */ color: oklch(56.7% 0.189 328.8);
Tailwind
colors: {
  custom: {
    50: '#ca7ec5',
    500: '#af42ac',
    950: '#000000',
  },
}
SCSS
$custom: #af42ac;
$custom-light: #ca7ec5;
$custom-dark: #000000;
JSON
{
  "hex": "#af42ac",
  "rgb": {
    "r": 175,
    "g": 66,
    "b": 172
  },
  "hsl": {
    "h": 301.651,
    "s": 45.228,
    "l": 47.255
  },
  "oklch": {
    "l": 0.5672,
    "c": 0.18892,
    "h": 328.8
  },
  "luminance": 0.15989
}

Semantic roles & 50–950 ramp

primary
#AF42AC
secondary
#8AC28C
accent
#D55653
background
#FCF8FC
surface
#F9EFF8
border
#D2CAD1
text
#140A13
muted
#827C82

Preview Lab

Preview with #AF42AC

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

Preview Lab → · Contrast checker → · Palette generator →

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