#AF40D8#AF40D8

#AF40D8 is a mid, highly saturated purple. Relative luminance 0.177; OKLCH L 59.1% C 0.230 H 315.3°. Best body text is #FFFFFF at 4.62:1 contrast (WCAG AA passes).

Color values

HEX#AF40D8
RGBrgb(175, 64, 216)
HSLhsl(284, 66%, 55%)
HSVhsv(284, 70%, 85%)
CMYKcmyk(19%, 70.4%, 0%, 15.3%)
CIE-LABlab(49.18, 66.55, -57.48)
CIE-LCHlch(49.18, 87.93, 319.18°)
OKLaboklab(59.12% 0.1634 -0.1618)
OKLCHoklch(59.12% 0.23 315.3)
XYZxyz(31.9053, 17.7398, 66.6959)
Luminance0.1774 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40D8 #69D840
analogous
#6340D8 #AF40D8 #D840B5
triadic
#AF40D8 #D8AF40 #40D8AF
tetradic
#AF40D8 #D86340 #69D840 #40B5D8
square
#AF40D8 #D86340 #69D840 #40B5D8
split-complementary
#AF40D8 #B5D840 #40D863
monochromatic
#671B83 #8F25B6 #AF40D8 #C473E2 #DAA6ED

Accessibility & contrast

On white

4.62
#AF40D8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.55
#AF40D8 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40D8
4.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40D8#FFFFFF#000000##FFFFFF
##AF40D81.004.624.554.62
#FFFFFF4.621.0021.001.00
#0000004.5521.001.0021.00
##FFFFFF4.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006FDC
Deuteranopia (green-blind)
#3C78D5
Tritanopia (blue-blind)
#AC5F88
Achromatopsia (no color)
#757575

Design tokens & code

CSS
--color: #af40d8;
/* rgb */ color: rgb(175, 64, 216);
/* oklch */ color: oklch(59.1% 0.230 315.3);
Tailwind
colors: {
  custom: {
    50: '#cb7ee5',
    500: '#af40d8',
    950: '#000000',
  },
}
SCSS
$custom: #af40d8;
$custom-light: #cb7ee5;
$custom-dark: #000000;
JSON
{
  "hex": "#af40d8",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 216
  },
  "hsl": {
    "h": 283.816,
    "s": 66.087,
    "l": 54.902
  },
  "oklch": {
    "l": 0.59122,
    "c": 0.22999,
    "h": 315.3
  },
  "luminance": 0.17739
}

Semantic roles & 50–950 ramp

primary
#AF40D8
secondary
#ABDA9A
accent
#E93F6D
background
#FCF8FE
surface
#F9EFFC
border
#D2CAD5
text
#140B16
muted
#827C84

Preview Lab

Preview with #AF40D8

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

Preview Lab → · Contrast checker → · Palette generator →

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