#AF51EB#AF51EB

#AF51EB is a light, highly saturated violet. Relative luminance 0.210; OKLCH L 62.2% C 0.227 H 309.3°. Best body text is #000000 at 5.20:1 contrast (WCAG AA passes).

Color values

HEX#AF51EB
RGBrgb(175, 81, 235)
HSLhsl(277, 79%, 62%)
HSVhsv(277, 66%, 92%)
CMYKcmyk(25.5%, 65.5%, 0%, 7.8%)
CIE-LABlab(52.95, 63.28, -62.16)
CIE-LCHlch(52.95, 88.71, 315.51°)
OKLaboklab(62.2% 0.144 -0.1757)
OKLCHoklch(62.2% 0.227 309.3)
XYZxyz(35.6141, 20.9976, 80.7580)
Luminance0.2100 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF51EB #8DEB51
analogous
#6251EB #AF51EB #EB51DA
triadic
#AF51EB #EBAF51 #51EBAF
tetradic
#AF51EB #EB6251 #8DEB51 #51DAEB
square
#AF51EB #EB6251 #8DEB51 #51DAEB
split-complementary
#AF51EB #DAEB51 #51EB62
monochromatic
#7214AE #961AE5 #AF51EB #C888F1 #E1BFF8

Accessibility & contrast

On white

4.04
#AF51EB on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

5.20
#AF51EB on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #AF51EB
5.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF51EB#FFFFFF#000000##000000
##AF51EB1.004.045.205.20
#FFFFFF4.041.0021.0021.00
#0000005.2021.001.001.00
##0000005.2021.001.001.00

Color blindness preview

Protanopia (red-blind)
#007AF0
Deuteranopia (green-blind)
#3880E8
Tritanopia (blue-blind)
#A67197
Achromatopsia (no color)
#7E7E7E

Design tokens & code

CSS
--color: #af51eb;
/* rgb */ color: rgb(175, 81, 235);
/* oklch */ color: oklch(62.2% 0.227 309.3);
Tailwind
colors: {
  custom: {
    50: '#cb88f2',
    500: '#af51eb',
    950: '#000000',
  },
}
SCSS
$custom: #af51eb;
$custom-light: #cb88f2;
$custom-dark: #000000;
JSON
{
  "hex": "#af51eb",
  "rgb": {
    "r": 175,
    "g": 81,
    "b": 235
  },
  "hsl": {
    "h": 276.623,
    "s": 79.381,
    "l": 61.961
  },
  "oklch": {
    "l": 0.62202,
    "c": 0.22718,
    "h": 309.3
  },
  "luminance": 0.20997
}

Semantic roles & 50–950 ramp

primary
#AF51EB
secondary
#C6E8B0
accent
#DC0A5C
background
#FCF8FE
surface
#F9F0FD
border
#D2CBD5
text
#140C17
muted
#827D85

Preview Lab

Preview with #AF51EB

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

Preview Lab → · Contrast checker → · Palette generator →

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