#AF42AB#AF42AB

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

Color values

HEX#AF42AB
RGBrgb(175, 66, 171)
HSLhsl(302, 45%, 47%)
HSVhsv(302, 62%, 69%)
CMYKcmyk(0%, 62.3%, 2.3%, 31.4%)
CIE-LABlab(46.91, 57.42, -34.98)
CIE-LCHlch(46.91, 67.24, 328.65°)
OKLaboklab(56.67% 0.1616 -0.0963)
OKLCHoklch(56.67% 0.188 329.2)
XYZxyz(26.9778, 15.9525, 40.1784)
Luminance0.1595 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF42AB #42AF46
analogous
#7D42AF #AF42AB #AF4274
triadic
#AF42AB #ABAF42 #42ABAF
tetradic
#AF42AB #AF7D42 #42AF46 #4274AF
square
#AF42AB #AF7D42 #42AF46 #4274AF
split-complementary
#AF42AB #74AF42 #42AF7D
monochromatic
#562054 #833180 #AF42AB #C668C3 #D795D4

Accessibility & contrast

On white

5.01
#AF42AB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.19
#AF42AB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF42AB
5.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF42AB#FFFFFF#000000##FFFFFF
##AF42AB1.005.014.195.01
#FFFFFF5.011.0021.001.00
#0000004.1921.001.0021.00
##FFFFFF5.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3866AE
Deuteranopia (green-blind)
#5E74A8
Tritanopia (blue-blind)
#B54F70
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #af42ab;
/* rgb */ color: rgb(175, 66, 171);
/* oklch */ color: oklch(56.7% 0.188 329.2);
Tailwind
colors: {
  custom: {
    50: '#ca7ec4',
    500: '#af42ab',
    950: '#000000',
  },
}
SCSS
$custom: #af42ab;
$custom-light: #ca7ec4;
$custom-dark: #000000;
JSON
{
  "hex": "#af42ab",
  "rgb": {
    "r": 175,
    "g": 66,
    "b": 171
  },
  "hsl": {
    "h": 302.202,
    "s": 45.228,
    "l": 47.255
  },
  "oklch": {
    "l": 0.56667,
    "c": 0.18809,
    "h": 329.2
  },
  "luminance": 0.15951
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #AF42AB

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

Preview Lab → · Contrast checker → · Palette generator →

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