#AF40B2#AF40B2

#AF40B2 is a mid, vivid purple. Relative luminance 0.160; OKLCH L 56.8% C 0.197 H 326.7°. Best body text is #FFFFFF at 5.00:1 contrast (WCAG AA passes).

Color values

HEX#AF40B2
RGBrgb(175, 64, 178)
HSLhsl(298, 47%, 47%)
HSVhsv(298, 64%, 70%)
CMYKcmyk(1.7%, 64%, 0%, 30.2%)
CIE-LABlab(46.97, 59.47, -39.01)
CIE-LCHlch(46.97, 71.12, 326.74°)
OKLaboklab(56.83% 0.1644 -0.1079)
OKLCHoklch(56.83% 0.197 326.7)
XYZxyz(27.5480, 15.9969, 43.7476)
Luminance0.1600 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF40B2 #43B240
analogous
#7640B2 #AF40B2 #B2407C
triadic
#AF40B2 #B2AF40 #40B2AF
tetradic
#AF40B2 #B27640 #43B240 #407CB2
square
#AF40B2 #B27640 #43B240 #407CB2
split-complementary
#AF40B2 #7CB240 #40B276
monochromatic
#562058 #833085 #AF40B2 #C667C8 #D794D8

Accessibility & contrast

On white

5.00
#AF40B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.20
#AF40B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #AF40B2
5.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF40B2#FFFFFF#000000##FFFFFF
##AF40B21.005.004.205.00
#FFFFFF5.001.0021.001.00
#0000004.2021.001.0021.00
##FFFFFF5.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2F66B5
Deuteranopia (green-blind)
#5974AF
Tritanopia (blue-blind)
#B45073
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #af40b2;
/* rgb */ color: rgb(175, 64, 178);
/* oklch */ color: oklch(56.8% 0.197 326.7);
Tailwind
colors: {
  custom: {
    50: '#ca7dc9',
    500: '#af40b2',
    950: '#000000',
  },
}
SCSS
$custom: #af40b2;
$custom-light: #ca7dc9;
$custom-dark: #000000;
JSON
{
  "hex": "#af40b2",
  "rgb": {
    "r": 175,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 298.421,
    "s": 47.107,
    "l": 47.451
  },
  "oklch": {
    "l": 0.56826,
    "c": 0.19667,
    "h": 326.7
  },
  "luminance": 0.15995
}

Semantic roles & 50–950 ramp

primary
#AF40B2
secondary
#8BC48A
accent
#D75155
background
#FCF8FC
surface
#F9EFF8
border
#D2CAD1
text
#140A13
muted
#827C82

Preview Lab

Preview with #AF40B2

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

Preview Lab → · Contrast checker → · Palette generator →

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