#AF40C9#AF40C9

#AF40C9 is a mid, highly saturated purple. Relative luminance 0.170; OKLCH L 58.2% C 0.217 H 319.4°. Best body text is #FFFFFF at 4.77:1 contrast (WCAG AA passes).

Color values

HEX#AF40C9
RGBrgb(175, 64, 201)
HSLhsl(289, 56%, 52%)
HSVhsv(289, 68%, 79%)
CMYKcmyk(12.9%, 68.2%, 0%, 21.2%)
CIE-LABlab(48.26, 63.66, -50.35)
CIE-LCHlch(48.26, 81.16, 321.66°)
OKLaboklab(58.17% 0.1645 -0.141)
OKLCHoklch(58.17% 0.217 319.4)
XYZxyz(30.0539, 16.9992, 56.9451)
Luminance0.1700 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40C9 #5AC940
analogous
#6B40C9 #AF40C9 #C9409F
triadic
#AF40C9 #C9AF40 #40C9AF
tetradic
#AF40C9 #C96B40 #5AC940 #409FC9
square
#AF40C9 #C96B40 #5AC940 #409FC9
split-complementary
#AF40C9 #9FC940 #40C96B
monochromatic
#601F6F #892D9F #AF40C9 #C370D6 #D79FE4

Accessibility & contrast

On white

4.77
#AF40C9 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.40
#AF40C9 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40C9
4.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40C9#FFFFFF#000000##FFFFFF
##AF40C91.004.774.404.77
#FFFFFF4.771.0021.001.00
#0000004.4021.001.0021.00
##FFFFFF4.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006BCD
Deuteranopia (green-blind)
#4A76C6
Tritanopia (blue-blind)
#AF5980
Achromatopsia (no color)
#737373

Design tokens & code

CSS
--color: #af40c9;
/* rgb */ color: rgb(175, 64, 201);
/* oklch */ color: oklch(58.2% 0.217 319.4);
Tailwind
colors: {
  custom: {
    50: '#cb7eda',
    500: '#af40c9',
    950: '#000000',
  },
}
SCSS
$custom: #af40c9;
$custom-light: #cb7eda;
$custom-dark: #000000;
JSON
{
  "hex": "#af40c9",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 201
  },
  "hsl": {
    "h": 288.613,
    "s": 55.918,
    "l": 51.961
  },
  "oklch": {
    "l": 0.5817,
    "c": 0.2166,
    "h": 319.4
  },
  "luminance": 0.16998
}

Semantic roles & 50–950 ramp

primary
#AF40C9
secondary
#A0D094
accent
#DF4965
background
#FCF8FD
surface
#F9EFFB
border
#D2CAD4
text
#140A15
muted
#827C83

Preview Lab

Preview with #AF40C9

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

Preview Lab → · Contrast checker → · Palette generator →

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