#AF40C8#AF40C8

#AF40C8 is a mid, highly saturated purple. Relative luminance 0.170; OKLCH L 58.1% C 0.216 H 319.7°. Best body text is #FFFFFF at 4.78:1 contrast (WCAG AA passes).

Color values

HEX#AF40C8
RGBrgb(175, 64, 200)
HSLhsl(289, 55%, 52%)
HSVhsv(289, 68%, 78%)
CMYKcmyk(12.5%, 68%, 0%, 21.6%)
CIE-LABlab(48.20, 63.47, -49.86)
CIE-LCHlch(48.20, 80.71, 321.85°)
OKLaboklab(58.11% 0.1645 -0.1395)
OKLCHoklch(58.11% 0.216 319.7)
XYZxyz(29.9366, 16.9523, 56.3276)
Luminance0.1695 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40C8 #59C840
analogous
#6B40C8 #AF40C8 #C8409D
triadic
#AF40C8 #C8AF40 #40C8AF
tetradic
#AF40C8 #C86B40 #59C840 #409DC8
square
#AF40C8 #C86B40 #59C840 #409DC8
split-complementary
#AF40C8 #9DC840 #40C86B
monochromatic
#60206E #892D9D #AF40C8 #C370D6 #D79FE3

Accessibility & contrast

On white

4.78
#AF40C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.39
#AF40C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40C8
4.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40C8#FFFFFF#000000##FFFFFF
##AF40C81.004.784.394.78
#FFFFFF4.781.0021.001.00
#0000004.3921.001.0021.00
##FFFFFF4.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#036BCC
Deuteranopia (green-blind)
#4B76C5
Tritanopia (blue-blind)
#AF597F
Achromatopsia (no color)
#727272

Design tokens & code

CSS
--color: #af40c8;
/* rgb */ color: rgb(175, 64, 200);
/* oklch */ color: oklch(58.1% 0.216 319.7);
Tailwind
colors: {
  custom: {
    50: '#ca7ed9',
    500: '#af40c8',
    950: '#000000',
  },
}
SCSS
$custom: #af40c8;
$custom-light: #ca7ed9;
$custom-dark: #000000;
JSON
{
  "hex": "#af40c8",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 288.971,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.58108,
    "c": 0.21571,
    "h": 319.7
  },
  "luminance": 0.16951
}

Semantic roles & 50–950 ramp

primary
#AF40C8
secondary
#9FD094
accent
#DF4965
background
#FCF8FD
surface
#F9EFFB
border
#D2CAD4
text
#140A15
muted
#827C83

Preview Lab

Preview with #AF40C8

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

Preview Lab → · Contrast checker → · Palette generator →

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