#AF51B2#AF51B2

#AF51B2 is a mid, vivid purple. Relative luminance 0.182; OKLCH L 58.9% C 0.172 H 326.3°. Best body text is #000000 at 4.64:1 contrast (WCAG AA passes).

Color values

HEX#AF51B2
RGBrgb(175, 81, 178)
HSLhsl(298, 39%, 51%)
HSVhsv(298, 54%, 70%)
CMYKcmyk(1.7%, 54.5%, 0%, 30.2%)
CIE-LABlab(49.76, 51.84, -34.62)
CIE-LCHlch(49.76, 62.34, 326.26°)
OKLaboklab(58.86% 0.143 -0.0954)
OKLCHoklch(58.86% 0.172 326.3)
XYZxyz(28.6569, 18.2148, 44.1172)
Luminance0.1821 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF51B2 #54B251
analogous
#7E51B2 #AF51B2 #B25184
triadic
#AF51B2 #B2AF51 #51B2AF
tetradic
#AF51B2 #B27E51 #54B251 #5184B2
square
#AF51B2 #B27E51 #54B251 #5184B2
split-complementary
#AF51B2 #84B251 #51B27E
monochromatic
#5D2A5F #873D89 #AF51B2 #C37BC5 #D6A6D8

Accessibility & contrast

On white

4.52
#AF51B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.64
#AF51B2 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #AF51B2
4.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF51B2#FFFFFF#000000##000000
##AF51B21.004.524.644.64
#FFFFFF4.521.0021.0021.00
#0000004.6421.001.001.00
##0000004.6421.001.001.00

Color blindness preview

Protanopia (red-blind)
#466FB5
Deuteranopia (green-blind)
#647BAF
Tritanopia (blue-blind)
#B35D7A
Achromatopsia (no color)
#767676

Design tokens & code

CSS
--color: #af51b2;
/* rgb */ color: rgb(175, 81, 178);
/* oklch */ color: oklch(58.9% 0.172 326.3);
Tailwind
colors: {
  custom: {
    50: '#c986c9',
    500: '#af51b2',
    950: '#000000',
  },
}
SCSS
$custom: #af51b2;
$custom-light: #c986c9;
$custom-dark: #000000;
JSON
{
  "hex": "#af51b2",
  "rgb": {
    "r": 175,
    "g": 81,
    "b": 178
  },
  "hsl": {
    "h": 298.144,
    "s": 38.645,
    "l": 50.784
  },
  "oklch": {
    "l": 0.58856,
    "c": 0.17194,
    "h": 326.3
  },
  "luminance": 0.18213
}

Semantic roles & 50–950 ramp

primary
#AF51B2
secondary
#9BC59A
accent
#CF595D
background
#FCF8FC
surface
#F9F0F8
border
#D2CBD1
text
#130B13
muted
#827C82

Preview Lab

Preview with #AF51B2

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

Preview Lab → · Contrast checker → · Palette generator →

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