#AF40AB#AF40AB

#AF40AB is a mid, vivid purple. Relative luminance 0.157; OKLCH L 56.4% C 0.191 H 329.2°. Best body text is #FFFFFF at 5.07:1 contrast (WCAG AA passes).

Color values

HEX#AF40AB
RGBrgb(175, 64, 171)
HSLhsl(302, 46%, 47%)
HSVhsv(302, 63%, 69%)
CMYKcmyk(0%, 63.4%, 2.3%, 31.4%)
CIE-LABlab(46.61, 58.26, -35.46)
CIE-LCHlch(46.61, 68.20, 328.67°)
OKLaboklab(56.45% 0.164 -0.0977)
OKLCHoklch(56.45% 0.191 329.2)
XYZxyz(26.8630, 15.7229, 40.1401)
Luminance0.1572 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40AB #40AF44
analogous
#7C40AF #AF40AB #AF4074
triadic
#AF40AB #ABAF40 #40ABAF
tetradic
#AF40AB #AF7C40 #40AF44 #4074AF
square
#AF40AB #AF7C40 #40AF44 #4074AF
split-complementary
#AF40AB #74AF40 #40AF7C
monochromatic
#551F53 #82307F #AF40AB #C765C3 #D792D5

Accessibility & contrast

On white

5.07
#AF40AB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.14
#AF40AB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40AB
5.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40AB#FFFFFF#000000##FFFFFF
##AF40AB1.005.074.145.07
#FFFFFF5.071.0021.001.00
#0000004.1421.001.0021.00
##FFFFFF5.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3565AE
Deuteranopia (green-blind)
#5D74A8
Tritanopia (blue-blind)
#B54D70
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #af40ab;
/* rgb */ color: rgb(175, 64, 171);
/* oklch */ color: oklch(56.4% 0.191 329.2);
Tailwind
colors: {
  custom: {
    50: '#ca7dc4',
    500: '#af40ab',
    950: '#000000',
  },
}
SCSS
$custom: #af40ab;
$custom-light: #ca7dc4;
$custom-dark: #000000;
JSON
{
  "hex": "#af40ab",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 171
  },
  "hsl": {
    "h": 302.162,
    "s": 46.444,
    "l": 46.863
  },
  "oklch": {
    "l": 0.56447,
    "c": 0.19085,
    "h": 329.2
  },
  "luminance": 0.15721
}

Semantic roles & 50–950 ramp

primary
#AF40AB
secondary
#88C38A
accent
#D65652
background
#FCF7FC
surface
#F9EEF8
border
#D2C9D1
text
#140A13
muted
#827C82

Preview Lab

Preview with #AF40AB

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

Preview Lab → · Contrast checker → · Palette generator →

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