#A040D4#A040D4

#A040D4 is a mid, highly saturated violet. Relative luminance 0.159; OKLCH L 56.9% C 0.221 H 311.0°. Best body text is #FFFFFF at 5.03:1 contrast (WCAG AA passes).

Color values

HEX#A040D4
RGBrgb(160, 64, 212)
HSLhsl(279, 63%, 54%)
HSVhsv(279, 70%, 83%)
CMYKcmyk(24.5%, 69.8%, 0%, 16.9%)
CIE-LABlab(46.84, 62.69, -59.07)
CIE-LCHlch(46.84, 86.13, 316.70°)
OKLaboklab(56.94% 0.1451 -0.167)
OKLCHoklch(56.94% 0.221 311)
XYZxyz(28.2120, 15.8945, 63.8564)
Luminance0.1589 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#A040D4 #74D440
analogous
#5640D4 #A040D4 #D440BE
triadic
#A040D4 #D4A040 #40D4A0
tetradic
#A040D4 #D45640 #74D440 #40BED4
square
#A040D4 #D45640 #74D440 #40BED4
split-complementary
#A040D4 #BED440 #40D456
monochromatic
#5B1C7D #8027AF #A040D4 #B972DF #D2A4EA

Accessibility & contrast

On white

5.03
#A040D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.18
#A040D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #A040D4
5.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##A040D4#FFFFFF#000000##FFFFFF
##A040D41.005.034.185.03
#FFFFFF5.031.0021.001.00
#0000004.1821.001.0021.00
##FFFFFF5.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006BD8
Deuteranopia (green-blind)
#2A71D1
Tritanopia (blue-blind)
#996086
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #a040d4;
/* rgb */ color: rgb(160, 64, 212);
/* oklch */ color: oklch(56.9% 0.221 311.0);
Tailwind
colors: {
  custom: {
    50: '#c17de2',
    500: '#a040d4',
    950: '#000000',
  },
}
SCSS
$custom: #a040d4;
$custom-light: #c17de2;
$custom-dark: #000000;
JSON
{
  "hex": "#a040d4",
  "rgb": {
    "r": 160,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 278.919,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.56938,
    "c": 0.22126,
    "h": 311
  },
  "luminance": 0.15894
}

Semantic roles & 50–950 ramp

primary
#A040D4
secondary
#AFD798
accent
#E6427B
background
#FCF7FD
surface
#F8EEFB
border
#D1C9D4
text
#130A15
muted
#827C83

Preview Lab

Preview with #A040D4

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

Preview Lab → · Contrast checker → · Palette generator →

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