#AF40C2#AF40C2

#AF40C2 is a mid, highly saturated purple. Relative luminance 0.167; OKLCH L 57.7% C 0.210 H 321.5°. Best body text is #FFFFFF at 4.84:1 contrast (WCAG AA passes).

Color values

HEX#AF40C2
RGBrgb(175, 64, 194)
HSLhsl(291, 52%, 51%)
HSVhsv(291, 67%, 76%)
CMYKcmyk(9.8%, 67%, 0%, 23.9%)
CIE-LABlab(47.85, 62.35, -46.95)
CIE-LCHlch(47.85, 78.05, 323.02°)
OKLaboklab(57.75% 0.1647 -0.131)
OKLCHoklch(57.75% 0.21 321.5)
XYZxyz(29.2491, 16.6773, 52.7069)
Luminance0.1668 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40C2 #53C240
analogous
#6E40C2 #AF40C2 #C24094
triadic
#AF40C2 #C2AF40 #40C2AF
tetradic
#AF40C2 #C26E40 #53C240 #4094C2
square
#AF40C2 #C26E40 #53C240 #4094C2
split-complementary
#AF40C2 #94C240 #40C26E
monochromatic
#5D2167 #863095 #AF40C2 #C26ED1 #D69DE0

Accessibility & contrast

On white

4.84
#AF40C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.34
#AF40C2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40C2
4.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40C2#FFFFFF#000000##FFFFFF
##AF40C21.004.844.344.84
#FFFFFF4.841.0021.001.00
#0000004.3421.001.0021.00
##FFFFFF4.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#176AC6
Deuteranopia (green-blind)
#4F76BF
Tritanopia (blue-blind)
#B1567C
Achromatopsia (no color)
#727272

Design tokens & code

CSS
--color: #af40c2;
/* rgb */ color: rgb(175, 64, 194);
/* oklch */ color: oklch(57.7% 0.210 321.5);
Tailwind
colors: {
  custom: {
    50: '#ca7dd5',
    500: '#af40c2',
    950: '#000000',
  },
}
SCSS
$custom: #af40c2;
$custom-light: #ca7dd5;
$custom-dark: #000000;
JSON
{
  "hex": "#af40c2",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 291.231,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.57746,
    "c": 0.21043,
    "h": 321.5
  },
  "luminance": 0.16676
}

Semantic roles & 50–950 ramp

primary
#AF40C2
secondary
#9ACC92
accent
#DB4D62
background
#FCF8FD
surface
#F9EFFA
border
#D2CAD3
text
#140A14
muted
#827C83

Preview Lab

Preview with #AF40C2

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

Preview Lab → · Contrast checker → · Palette generator →

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