#8A40D1#8A40D1

#8A40D1 is a mid, highly saturated violet. Relative luminance 0.137; OKLCH L 54.1% C 0.213 H 303.3°. Best body text is #FFFFFF at 5.62:1 contrast (WCAG AA passes).

Color values

HEX#8A40D1
RGBrgb(138, 64, 209)
HSLhsl(271, 61%, 54%)
HSVhsv(271, 69%, 82%)
CMYKcmyk(34%, 69.4%, 0%, 18%)
CIE-LABlab(43.76, 57.65, -62.46)
CIE-LCHlch(43.76, 85.00, 312.71°)
OKLaboklab(54.07% 0.1166 -0.1777)
OKLCHoklch(54.07% 0.213 303.3)
XYZxyz(23.8206, 13.6735, 61.6936)
Luminance0.1367 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40D1 #87D140
analogous
#4140D1 #8A40D1 #D140CF
triadic
#8A40D1 #D18A40 #40D18A
tetradic
#8A40D1 #D14140 #87D140 #40CFD1
square
#8A40D1 #D14140 #87D140 #40CFD1
split-complementary
#8A40D1 #CFD140 #40D141
monochromatic
#4C1D79 #6B29AB #8A40D1 #A871DD #C6A3E9

Accessibility & contrast

On white

5.62
#8A40D1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.73
#8A40D1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40D1
5.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40D1#FFFFFF#000000##FFFFFF
##8A40D11.005.623.735.62
#FFFFFF5.621.0021.001.00
#0000003.7321.001.0021.00
##FFFFFF5.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0066D5
Deuteranopia (green-blind)
#0067CE
Tritanopia (blue-blind)
#7C6284
Achromatopsia (no color)
#676767

Design tokens & code

CSS
--color: #8a40d1;
/* rgb */ color: rgb(138, 64, 209);
/* oklch */ color: oklch(54.1% 0.213 303.3);
Tailwind
colors: {
  custom: {
    50: '#b27ae0',
    500: '#8a40d1',
    950: '#000000',
  },
}
SCSS
$custom: #8a40d1;
$custom-light: #b27ae0;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40d1",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 209
  },
  "hsl": {
    "h": 270.621,
    "s": 61.181,
    "l": 53.529
  },
  "oklch": {
    "l": 0.54069,
    "c": 0.21253,
    "h": 303.3
  },
  "luminance": 0.13674
}

Semantic roles & 50–950 ramp

primary
#8A40D1
secondary
#B6D597
accent
#E44492
background
#FBF7FD
surface
#F6EEFB
border
#D0C9D4
text
#110A15
muted
#807C83

Preview Lab

Preview with #8A40D1

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

Preview Lab → · Contrast checker → · Palette generator →

#8A40D1 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva