#AF51E7#AF51E7

#AF51E7 is a mid, highly saturated violet. Relative luminance 0.208; OKLCH L 61.9% C 0.223 H 310.3°. Best body text is #000000 at 5.15:1 contrast (WCAG AA passes).

Color values

HEX#AF51E7
RGBrgb(175, 81, 231)
HSLhsl(278, 76%, 61%)
HSVhsv(278, 65%, 91%)
CMYKcmyk(24.2%, 64.9%, 0%, 9.4%)
CIE-LABlab(52.70, 62.43, -60.32)
CIE-LCHlch(52.70, 86.81, 315.98°)
OKLaboklab(61.94% 0.1443 -0.1703)
OKLCHoklch(61.94% 0.223 310.3)
XYZxyz(35.0427, 20.7691, 77.7486)
Luminance0.2077 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#AF51E7 #89E751
analogous
#6451E7 #AF51E7 #E751D4
triadic
#AF51E7 #E7AF51 #51E7AF
tetradic
#AF51E7 #E76451 #89E751 #51D4E7
square
#AF51E7 #E76451 #89E751 #51D4E7
split-complementary
#AF51E7 #D4E751 #51E764
monochromatic
#7117A7 #951EDC #AF51E7 #C887EE #E0BDF6

Accessibility & contrast

On white

4.07
#AF51E7 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

5.15
#AF51E7 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #AF51E7
5.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##AF51E7#FFFFFF#000000##000000
##AF51E71.004.075.155.15
#FFFFFF4.071.0021.0021.00
#0000005.1521.001.001.00
##0000005.1521.001.001.00

Color blindness preview

Protanopia (red-blind)
#007AEC
Deuteranopia (green-blind)
#3D7FE4
Tritanopia (blue-blind)
#A87095
Achromatopsia (no color)
#7E7E7E

Design tokens & code

CSS
--color: #af51e7;
/* rgb */ color: rgb(175, 81, 231);
/* oklch */ color: oklch(61.9% 0.223 310.3);
Tailwind
colors: {
  custom: {
    50: '#cb88ef',
    500: '#af51e7',
    950: '#000000',
  },
}
SCSS
$custom: #af51e7;
$custom-light: #cb88ef;
$custom-dark: #000000;
JSON
{
  "hex": "#af51e7",
  "rgb": {
    "r": 175,
    "g": 81,
    "b": 231
  },
  "hsl": {
    "h": 277.6,
    "s": 75.758,
    "l": 61.176
  },
  "oklch": {
    "l": 0.61941,
    "c": 0.2232,
    "h": 310.3
  },
  "luminance": 0.20768
}

Semantic roles & 50–950 ramp

primary
#AF51E7
secondary
#C3E6AE
accent
#D80E59
background
#FCF8FE
surface
#F9F0FD
border
#D2CBD5
text
#140C17
muted
#827D85

Preview Lab

Preview with #AF51E7

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

Preview Lab → · Contrast checker → · Palette generator →

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