#AF40C7#AF40C7

#AF40C7 is a mid, highly saturated purple. Relative luminance 0.169; OKLCH L 58.0% C 0.215 H 320.0°. Best body text is #FFFFFF at 4.79:1 contrast (WCAG AA passes).

Color values

HEX#AF40C7
RGBrgb(175, 64, 199)
HSLhsl(289, 55%, 52%)
HSVhsv(289, 68%, 78%)
CMYKcmyk(12.1%, 67.8%, 0%, 22%)
CIE-LABlab(48.14, 63.28, -49.38)
CIE-LCHlch(48.14, 80.27, 322.03°)
OKLaboklab(58.05% 0.1645 -0.1381)
OKLCHoklch(58.05% 0.215 320)
XYZxyz(29.8201, 16.9057, 55.7141)
Luminance0.1690 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40C7 #58C740
analogous
#6C40C7 #AF40C7 #C7409C
triadic
#AF40C7 #C7AF40 #40C7AF
tetradic
#AF40C7 #C76C40 #58C740 #409CC7
square
#AF40C7 #C76C40 #58C740 #409CC7
split-complementary
#AF40C7 #9CC740 #40C76C
monochromatic
#5F206D #882E9C #AF40C7 #C36FD5 #D79FE3

Accessibility & contrast

On white

4.79
#AF40C7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.38
#AF40C7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40C7
4.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40C7#FFFFFF#000000##FFFFFF
##AF40C71.004.794.384.79
#FFFFFF4.791.0021.001.00
#0000004.3821.001.0021.00
##FFFFFF4.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#076BCB
Deuteranopia (green-blind)
#4C76C4
Tritanopia (blue-blind)
#B0587F
Achromatopsia (no color)
#727272

Design tokens & code

CSS
--color: #af40c7;
/* rgb */ color: rgb(175, 64, 199);
/* oklch */ color: oklch(58.0% 0.215 320.0);
Tailwind
colors: {
  custom: {
    50: '#ca7ed9',
    500: '#af40c7',
    950: '#000000',
  },
}
SCSS
$custom: #af40c7;
$custom-light: #ca7ed9;
$custom-dark: #000000;
JSON
{
  "hex": "#af40c7",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 199
  },
  "hsl": {
    "h": 289.333,
    "s": 54.656,
    "l": 51.569
  },
  "oklch": {
    "l": 0.58047,
    "c": 0.21482,
    "h": 320
  },
  "luminance": 0.16904
}

Semantic roles & 50–950 ramp

primary
#AF40C7
secondary
#9ECF94
accent
#DE4A64
background
#FCF8FD
surface
#F9EFFA
border
#D2CAD3
text
#140A15
muted
#827C83

Preview Lab

Preview with #AF40C7

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

Preview Lab → · Contrast checker → · Palette generator →

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