#AF40AC#AF40AC

#AF40AC is a mid, vivid purple. Relative luminance 0.158; OKLCH L 56.5% C 0.192 H 328.8°. Best body text is #FFFFFF at 5.06:1 contrast (WCAG AA passes).

Color values

HEX#AF40AC
RGBrgb(175, 64, 172)
HSLhsl(302, 46%, 47%)
HSVhsv(302, 63%, 69%)
CMYKcmyk(0%, 63.4%, 1.7%, 31.4%)
CIE-LABlab(46.66, 58.43, -35.97)
CIE-LCHlch(46.66, 68.62, 328.38°)
OKLaboklab(56.5% 0.164 -0.0992)
OKLCHoklch(56.5% 0.192 328.8)
XYZxyz(26.9587, 15.7612, 40.6440)
Luminance0.1576 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40AC #40AF43
analogous
#7B40AF #AF40AC #AF4074
triadic
#AF40AC #ACAF40 #40ACAF
tetradic
#AF40AC #AF7B40 #40AF43 #4074AF
square
#AF40AC #AF7B40 #40AF43 #4074AF
split-complementary
#AF40AC #74AF40 #40AF7B
monochromatic
#551F54 #823080 #AF40AC #C765C4 #D792D5

Accessibility & contrast

On white

5.06
#AF40AC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.15
#AF40AC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40AC
5.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40AC#FFFFFF#000000##FFFFFF
##AF40AC1.005.064.155.06
#FFFFFF5.061.0021.001.00
#0000004.1521.001.0021.00
##FFFFFF5.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3465AF
Deuteranopia (green-blind)
#5C74A9
Tritanopia (blue-blind)
#B54D70
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #af40ac;
/* rgb */ color: rgb(175, 64, 172);
/* oklch */ color: oklch(56.5% 0.192 328.8);
Tailwind
colors: {
  custom: {
    50: '#ca7dc5',
    500: '#af40ac',
    950: '#000000',
  },
}
SCSS
$custom: #af40ac;
$custom-light: #ca7dc5;
$custom-dark: #000000;
JSON
{
  "hex": "#af40ac",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 172
  },
  "hsl": {
    "h": 301.622,
    "s": 46.444,
    "l": 46.863
  },
  "oklch": {
    "l": 0.565,
    "c": 0.19167,
    "h": 328.8
  },
  "luminance": 0.15759
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #AF40AC

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

Preview Lab → · Contrast checker → · Palette generator →

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