#AF40D5#AF40D5

#AF40D5 is a mid, highly saturated purple. Relative luminance 0.176; OKLCH L 58.9% C 0.227 H 316.1°. Best body text is #FFFFFF at 4.65:1 contrast (WCAG AA passes).

Color values

HEX#AF40D5
RGBrgb(175, 64, 213)
HSLhsl(285, 64%, 54%)
HSVhsv(285, 70%, 84%)
CMYKcmyk(17.8%, 70%, 0%, 16.5%)
CIE-LABlab(48.99, 65.96, -56.07)
CIE-LCHlch(48.99, 86.57, 319.64°)
OKLaboklab(58.93% 0.1637 -0.1577)
OKLCHoklch(58.93% 0.227 316.1)
XYZxyz(31.5210, 17.5861, 64.6719)
Luminance0.1759 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40D5 #66D540
analogous
#6540D5 #AF40D5 #D540B1
triadic
#AF40D5 #D5AF40 #40D5AF
tetradic
#AF40D5 #D56540 #66D540 #40B1D5
square
#AF40D5 #D56540 #66D540 #40B1D5
split-complementary
#AF40D5 #B1D540 #40D565
monochromatic
#661C7F #8E27B1 #AF40D5 #C472E0 #D9A4EB

Accessibility & contrast

On white

4.65
#AF40D5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.52
#AF40D5 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40D5
4.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40D5#FFFFFF#000000##FFFFFF
##AF40D51.004.654.524.65
#FFFFFF4.651.0021.001.00
#0000004.5221.001.0021.00
##FFFFFF4.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ED9
Deuteranopia (green-blind)
#3F77D2
Tritanopia (blue-blind)
#AD5E86
Achromatopsia (no color)
#747474

Design tokens & code

CSS
--color: #af40d5;
/* rgb */ color: rgb(175, 64, 213);
/* oklch */ color: oklch(58.9% 0.227 316.1);
Tailwind
colors: {
  custom: {
    50: '#cb7ee3',
    500: '#af40d5',
    950: '#000000',
  },
}
SCSS
$custom: #af40d5;
$custom-light: #cb7ee3;
$custom-dark: #000000;
JSON
{
  "hex": "#af40d5",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 213
  },
  "hsl": {
    "h": 284.698,
    "s": 63.948,
    "l": 54.314
  },
  "oklch": {
    "l": 0.58927,
    "c": 0.2273,
    "h": 316.1
  },
  "luminance": 0.17585
}

Semantic roles & 50–950 ramp

primary
#AF40D5
secondary
#A9D899
accent
#E7416B
background
#FCF8FE
surface
#F9EFFC
border
#D2CAD5
text
#140B15
muted
#827C84

Preview Lab

Preview with #AF40D5

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

Preview Lab → · Contrast checker → · Palette generator →

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