#AF40D4#AF40D4

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

Color values

HEX#AF40D4
RGBrgb(175, 64, 212)
HSLhsl(285, 63%, 54%)
HSVhsv(285, 70%, 83%)
CMYKcmyk(17.5%, 69.8%, 0%, 16.9%)
CIE-LABlab(48.93, 65.77, -55.59)
CIE-LCHlch(48.93, 86.12, 319.79°)
OKLaboklab(58.86% 0.1638 -0.1563)
OKLCHoklch(58.86% 0.226 316.3)
XYZxyz(31.3944, 17.5355, 64.0055)
Luminance0.1753 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40D4 #65D440
analogous
#6540D4 #AF40D4 #D440AF
triadic
#AF40D4 #D4AF40 #40D4AF
tetradic
#AF40D4 #D46540 #65D440 #40AFD4
square
#AF40D4 #D46540 #65D440 #40AFD4
split-complementary
#AF40D4 #AFD440 #40D465
monochromatic
#651C7D #8D27AF #AF40D4 #C472DF #D9A4EA

Accessibility & contrast

On white

4.66
#AF40D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.51
#AF40D4 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40D4
4.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40D4#FFFFFF#000000##FFFFFF
##AF40D41.004.664.514.66
#FFFFFF4.661.0021.001.00
#0000004.5121.001.0021.00
##FFFFFF4.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006ED8
Deuteranopia (green-blind)
#4077D1
Tritanopia (blue-blind)
#AD5E86
Achromatopsia (no color)
#747474

Design tokens & code

CSS
--color: #af40d4;
/* rgb */ color: rgb(175, 64, 212);
/* oklch */ color: oklch(58.9% 0.226 316.3);
Tailwind
colors: {
  custom: {
    50: '#cb7ee2',
    500: '#af40d4',
    950: '#000000',
  },
}
SCSS
$custom: #af40d4;
$custom-light: #cb7ee2;
$custom-dark: #000000;
JSON
{
  "hex": "#af40d4",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 285,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.58862,
    "c": 0.22639,
    "h": 316.3
  },
  "luminance": 0.17534
}

Semantic roles & 50–950 ramp

primary
#AF40D4
secondary
#A8D798
accent
#E6426B
background
#FCF8FD
surface
#F9EFFB
border
#D2CAD4
text
#140B15
muted
#827C83

Preview Lab

Preview with #AF40D4

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

Preview Lab → · Contrast checker → · Palette generator →

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