#AF40D3#AF40D3

#AF40D3 is a mid, highly saturated purple. Relative luminance 0.175; OKLCH L 58.8% C 0.226 H 316.6°. Best body text is #FFFFFF at 4.67:1 contrast (WCAG AA passes).

Color values

HEX#AF40D3
RGBrgb(175, 64, 211)
HSLhsl(285, 63%, 54%)
HSVhsv(285, 70%, 83%)
CMYKcmyk(17.1%, 69.7%, 0%, 17.3%)
CIE-LABlab(48.87, 65.57, -55.12)
CIE-LCHlch(48.87, 85.66, 319.95°)
OKLaboklab(58.8% 0.1638 -0.1549)
OKLCHoklch(58.8% 0.226 316.6)
XYZxyz(31.2687, 17.4852, 63.3433)
Luminance0.1748 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40D3 #64D340
analogous
#6640D3 #AF40D3 #D340AE
triadic
#AF40D3 #D3AF40 #40D3AF
tetradic
#AF40D3 #D36640 #64D340 #40AED3
square
#AF40D3 #D36640 #64D340 #40AED3
split-complementary
#AF40D3 #AED340 #40D366
monochromatic
#651D7C #8D28AE #AF40D3 #C472DE #D9A3EA

Accessibility & contrast

On white

4.67
#AF40D3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.50
#AF40D3 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40D3
4.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40D3#FFFFFF#000000##FFFFFF
##AF40D31.004.674.504.67
#FFFFFF4.671.0021.001.00
#0000004.5021.001.0021.00
##FFFFFF4.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006DD7
Deuteranopia (green-blind)
#4177D0
Tritanopia (blue-blind)
#AD5D85
Achromatopsia (no color)
#747474

Design tokens & code

CSS
--color: #af40d3;
/* rgb */ color: rgb(175, 64, 211);
/* oklch */ color: oklch(58.8% 0.226 316.6);
Tailwind
colors: {
  custom: {
    50: '#cb7ee1',
    500: '#af40d3',
    950: '#000000',
  },
}
SCSS
$custom: #af40d3;
$custom-light: #cb7ee1;
$custom-dark: #000000;
JSON
{
  "hex": "#af40d3",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 211
  },
  "hsl": {
    "h": 285.306,
    "s": 62.553,
    "l": 53.922
  },
  "oklch": {
    "l": 0.58798,
    "c": 0.2255,
    "h": 316.6
  },
  "luminance": 0.17484
}

Semantic roles & 50–950 ramp

primary
#AF40D3
secondary
#A7D798
accent
#E6426A
background
#FCF8FD
surface
#F9EFFB
border
#D2CAD4
text
#140B15
muted
#827C83

Preview Lab

Preview with #AF40D3

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

Preview Lab → · Contrast checker → · Palette generator →

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