#AF40D9#AF40D9

#AF40D9 is a mid, highly saturated purple. Relative luminance 0.178; OKLCH L 59.2% C 0.231 H 315.0°. Best body text is #FFFFFF at 4.61:1 contrast (WCAG AA passes).

Color values

HEX#AF40D9
RGBrgb(175, 64, 217)
HSLhsl(284, 67%, 55%)
HSVhsv(284, 71%, 85%)
CMYKcmyk(19.4%, 70.5%, 0%, 14.9%)
CIE-LABlab(49.24, 66.74, -57.94)
CIE-LCHlch(49.24, 88.39, 319.04°)
OKLaboklab(59.19% 0.1633 -0.1632)
OKLCHoklch(59.19% 0.231 315)
XYZxyz(32.0349, 17.7917, 67.3788)
Luminance0.1779 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40D9 #6AD940
analogous
#6240D9 #AF40D9 #D940B7
triadic
#AF40D9 #D9AF40 #40D9AF
tetradic
#AF40D9 #D96240 #6AD940 #40B7D9
square
#AF40D9 #D96240 #6AD940 #40B7D9
split-complementary
#AF40D9 #B7D940 #40D962
monochromatic
#671A84 #8F24B7 #AF40D9 #C473E3 #DAA6ED

Accessibility & contrast

On white

4.61
#AF40D9 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.56
#AF40D9 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40D9
4.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40D9#FFFFFF#000000##FFFFFF
##AF40D91.004.614.564.61
#FFFFFF4.611.0021.001.00
#0000004.5621.001.0021.00
##FFFFFF4.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006FDD
Deuteranopia (green-blind)
#3B78D6
Tritanopia (blue-blind)
#AC6089
Achromatopsia (no color)
#757575

Design tokens & code

CSS
--color: #af40d9;
/* rgb */ color: rgb(175, 64, 217);
/* oklch */ color: oklch(59.2% 0.231 315.0);
Tailwind
colors: {
  custom: {
    50: '#cb7ee5',
    500: '#af40d9',
    950: '#000000',
  },
}
SCSS
$custom: #af40d9;
$custom-light: #cb7ee5;
$custom-dark: #000000;
JSON
{
  "hex": "#af40d9",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 217
  },
  "hsl": {
    "h": 283.529,
    "s": 66.812,
    "l": 55.098
  },
  "oklch": {
    "l": 0.59187,
    "c": 0.23089,
    "h": 315
  },
  "luminance": 0.17791
}

Semantic roles & 50–950 ramp

primary
#AF40D9
secondary
#ACDA9A
accent
#EA3E6D
background
#FDF8FE
surface
#FAEFFC
border
#D3CAD5
text
#140B16
muted
#837C84

Preview Lab

Preview with #AF40D9

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

Preview Lab → · Contrast checker → · Palette generator →

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