#AF51EC#AF51EC

#AF51EC is a light, highly saturated violet. Relative luminance 0.211; OKLCH L 62.3% C 0.228 H 309.1°. Best body text is #000000 at 5.21:1 contrast (WCAG AA passes).

Color values

HEX#AF51EC
RGBrgb(175, 81, 236)
HSLhsl(276, 80%, 62%)
HSVhsv(276, 66%, 93%)
CMYKcmyk(25.8%, 65.7%, 0%, 7.5%)
CIE-LABlab(53.01, 63.50, -62.62)
CIE-LCHlch(53.01, 89.18, 315.40°)
OKLaboklab(62.27% 0.1439 -0.1771)
OKLCHoklch(62.27% 0.228 309.1)
XYZxyz(35.7589, 21.0556, 81.5210)
Luminance0.2105 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF51EC #8EEC51
analogous
#6251EC #AF51EC #EC51DC
triadic
#AF51EC #ECAF51 #51ECAF
tetradic
#AF51EC #EC6251 #8EEC51 #51DCEC
square
#AF51EC #EC6251 #8EEC51 #51DCEC
split-complementary
#AF51EC #DCEC51 #51EC62
monochromatic
#7213AF #961AE6 #AF51EC #C888F2 #E2BFF8

Accessibility & contrast

On white

4.03
#AF51EC on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

5.21
#AF51EC on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #AF51EC
5.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF51EC#FFFFFF#000000##000000
##AF51EC1.004.035.215.21
#FFFFFF4.031.0021.0021.00
#0000005.2121.001.001.00
##0000005.2121.001.001.00

Color blindness preview

Protanopia (red-blind)
#007BF1
Deuteranopia (green-blind)
#3680E9
Tritanopia (blue-blind)
#A67298
Achromatopsia (no color)
#7F7F7F

Design tokens & code

CSS
--color: #af51ec;
/* rgb */ color: rgb(175, 81, 236);
/* oklch */ color: oklch(62.3% 0.228 309.1);
Tailwind
colors: {
  custom: {
    50: '#cb88f3',
    500: '#af51ec',
    950: '#000000',
  },
}
SCSS
$custom: #af51ec;
$custom-light: #cb88f3;
$custom-dark: #000000;
JSON
{
  "hex": "#af51ec",
  "rgb": {
    "r": 175,
    "g": 81,
    "b": 236
  },
  "hsl": {
    "h": 276.387,
    "s": 80.311,
    "l": 62.157
  },
  "oklch": {
    "l": 0.62268,
    "c": 0.22817,
    "h": 309.1
  },
  "luminance": 0.21055
}

Semantic roles & 50–950 ramp

primary
#AF51EC
secondary
#C6E9B0
accent
#DD095C
background
#FCF8FE
surface
#F9F0FD
border
#D2CBD5
text
#140C17
muted
#827D85

Preview Lab

Preview with #AF51EC

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

Preview Lab → · Contrast checker → · Palette generator →

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