#AF40D2#AF40D2

#AF40D2 is a mid, highly saturated purple. Relative luminance 0.174; OKLCH L 58.7% C 0.225 H 316.9°. Best body text is #FFFFFF at 4.68:1 contrast (WCAG AA passes).

Color values

HEX#AF40D2
RGBrgb(175, 64, 210)
HSLhsl(286, 62%, 54%)
HSVhsv(286, 70%, 82%)
CMYKcmyk(16.7%, 69.5%, 0%, 17.6%)
CIE-LABlab(48.80, 65.38, -54.65)
CIE-LCHlch(48.80, 85.21, 320.11°)
OKLaboklab(58.73% 0.1639 -0.1536)
OKLCHoklch(58.73% 0.225 316.9)
XYZxyz(31.1437, 17.4352, 62.6851)
Luminance0.1743 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40D2 #63D240
analogous
#6640D2 #AF40D2 #D240AC
triadic
#AF40D2 #D2AF40 #40D2AF
tetradic
#AF40D2 #D26640 #63D240 #40ACD2
square
#AF40D2 #D26640 #63D240 #40ACD2
split-complementary
#AF40D2 #ACD240 #40D266
monochromatic
#641D7B #8D29AC #AF40D2 #C472DE #D8A3E9

Accessibility & contrast

On white

4.68
#AF40D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.49
#AF40D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40D2
4.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40D2#FFFFFF#000000##FFFFFF
##AF40D21.004.684.494.68
#FFFFFF4.681.0021.001.00
#0000004.4921.001.0021.00
##FFFFFF4.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006DD6
Deuteranopia (green-blind)
#4277CF
Tritanopia (blue-blind)
#AD5D85
Achromatopsia (no color)
#747474

Design tokens & code

CSS
--color: #af40d2;
/* rgb */ color: rgb(175, 64, 210);
/* oklch */ color: oklch(58.7% 0.225 316.9);
Tailwind
colors: {
  custom: {
    50: '#cb7ee0',
    500: '#af40d2',
    950: '#000000',
  },
}
SCSS
$custom: #af40d2;
$custom-light: #cb7ee0;
$custom-dark: #000000;
JSON
{
  "hex": "#af40d2",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 285.616,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.58734,
    "c": 0.2246,
    "h": 316.9
  },
  "luminance": 0.17434
}

Semantic roles & 50–950 ramp

primary
#AF40D2
secondary
#A7D698
accent
#E5436A
background
#FCF8FD
surface
#F9EFFB
border
#D2CAD4
text
#140B15
muted
#827C83

Preview Lab

Preview with #AF40D2

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

Preview Lab → · Contrast checker → · Palette generator →

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