#8A40B4#8A40B4

#8A40B4 is a mid, vivid violet. Relative luminance 0.124; OKLCH L 52.0% C 0.182 H 311.0°. Best body text is #FFFFFF at 6.05:1 contrast (WCAG AA passes).

Color values

HEX#8A40B4
RGBrgb(138, 64, 180)
HSLhsl(278, 48%, 48%)
HSVhsv(278, 64%, 71%)
CMYKcmyk(23.3%, 64.4%, 0%, 29.4%)
CIE-LABlab(41.79, 51.00, -48.75)
CIE-LCHlch(41.79, 70.55, 316.29°)
OKLaboklab(52.03% 0.1195 -0.1374)
OKLCHoklch(52.03% 0.182 311)
XYZxyz(20.5513, 12.3658, 44.4754)
Luminance0.1236 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40B4 #6AB440
analogous
#5040B4 #8A40B4 #B440A4
triadic
#8A40B4 #B48A40 #40B48A
tetradic
#8A40B4 #B45040 #6AB440 #40A4B4
square
#8A40B4 #B45040 #6AB440 #40A4B4
split-complementary
#8A40B4 #A4B440 #40B450
monochromatic
#45205A #673087 #8A40B4 #A668C9 #C195D9

Accessibility & contrast

On white

6.05
#8A40B4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.47
#8A40B4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40B4
6.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40B4#FFFFFF#000000##FFFFFF
##8A40B41.006.053.476.05
#FFFFFF6.051.0021.001.00
#0000003.4721.001.0021.00
##FFFFFF6.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FB8
Deuteranopia (green-blind)
#3364B1
Tritanopia (blue-blind)
#855774
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #8a40b4;
/* rgb */ color: rgb(138, 64, 180);
/* oklch */ color: oklch(52.0% 0.182 311.0);
Tailwind
colors: {
  custom: {
    50: '#b07acb',
    500: '#8a40b4',
    950: '#000000',
  },
}
SCSS
$custom: #8a40b4;
$custom-light: #b07acb;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40b4",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 180
  },
  "hsl": {
    "h": 278.276,
    "s": 47.541,
    "l": 47.843
  },
  "oklch": {
    "l": 0.52032,
    "c": 0.18213,
    "h": 311
  },
  "luminance": 0.12365
}

Semantic roles & 50–950 ramp

primary
#8A40B4
secondary
#A0C58B
accent
#D75181
background
#FBF7FC
surface
#F6EEF9
border
#D0C9D2
text
#110913
muted
#807B82

Preview Lab

Preview with #8A40B4

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

Preview Lab → · Contrast checker → · Palette generator →

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