#8A40D4#8A40D4

#8A40D4 is a mid, highly saturated violet. Relative luminance 0.138; OKLCH L 54.3% C 0.216 H 302.6°. Best body text is #FFFFFF at 5.58:1 contrast (WCAG AA passes).

Color values

HEX#8A40D4
RGBrgb(138, 64, 212)
HSLhsl(270, 63%, 54%)
HSVhsv(270, 70%, 83%)
CMYKcmyk(34.9%, 69.8%, 0%, 16.9%)
CIE-LABlab(43.98, 58.36, -63.83)
CIE-LCHlch(43.98, 86.49, 312.43°)
OKLaboklab(54.29% 0.1161 -0.1817)
OKLCHoklch(54.29% 0.216 302.6)
XYZxyz(24.1955, 13.8235, 63.6681)
Luminance0.1382 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40D4 #8AD440
analogous
#4040D4 #8A40D4 #D440D4
triadic
#8A40D4 #D48A40 #40D48A
tetradic
#8A40D4 #D44040 #8AD440 #40D4D4
square
#8A40D4 #D44040 #8AD440 #40D4D4
split-complementary
#8A40D4 #D4D440 #40D440
monochromatic
#4D1C7D #6B27AF #8A40D4 #A972DF #C7A4EA

Accessibility & contrast

On white

5.58
#8A40D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.76
#8A40D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40D4
5.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40D4#FFFFFF#000000##FFFFFF
##8A40D41.005.583.765.58
#FFFFFF5.581.0021.001.00
#0000003.7621.001.0021.00
##FFFFFF5.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0067D8
Deuteranopia (green-blind)
#0067D1
Tritanopia (blue-blind)
#7B6386
Achromatopsia (no color)
#686868

Design tokens & code

CSS
--color: #8a40d4;
/* rgb */ color: rgb(138, 64, 212);
/* oklch */ color: oklch(54.3% 0.216 302.6);
Tailwind
colors: {
  custom: {
    50: '#b27be2',
    500: '#8a40d4',
    950: '#000000',
  },
}
SCSS
$custom: #8a40d4;
$custom-light: #b27be2;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40d4",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 270,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.54293,
    "c": 0.21567,
    "h": 302.6
  },
  "luminance": 0.13824
}

Semantic roles & 50–950 ramp

primary
#8A40D4
secondary
#B8D798
accent
#E64294
background
#FBF7FE
surface
#F6EEFC
border
#D0C9D5
text
#110A15
muted
#807C84

Preview Lab

Preview with #8A40D4

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

Preview Lab → · Contrast checker → · Palette generator →

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