#8A40B2#8A40B2

#8A40B2 is a mid, vivid violet. Relative luminance 0.123; OKLCH L 51.9% C 0.180 H 311.6°. Best body text is #FFFFFF at 6.07:1 contrast (WCAG AA passes).

Color values

HEX#8A40B2
RGBrgb(138, 64, 178)
HSLhsl(279, 47%, 47%)
HSVhsv(279, 64%, 70%)
CMYKcmyk(22.5%, 64%, 0%, 30.2%)
CIE-LABlab(41.67, 50.56, -47.78)
CIE-LCHlch(41.67, 69.56, 316.62°)
OKLaboklab(51.9% 0.1196 -0.1346)
OKLCHoklch(51.9% 0.18 311.6)
XYZxyz(20.3490, 12.2849, 43.4101)
Luminance0.1228 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40B2 #68B240
analogous
#5140B2 #8A40B2 #B240A1
triadic
#8A40B2 #B28A40 #40B28A
tetradic
#8A40B2 #B25140 #68B240 #40A1B2
square
#8A40B2 #B25140 #68B240 #40A1B2
split-complementary
#8A40B2 #A1B240 #40B251
monochromatic
#442058 #673085 #8A40B2 #A667C8 #C094D8

Accessibility & contrast

On white

6.07
#8A40B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.46
#8A40B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40B2
6.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40B2#FFFFFF#000000##FFFFFF
##8A40B21.006.073.466.07
#FFFFFF6.071.0021.001.00
#0000003.4621.001.0021.00
##FFFFFF6.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#055FB5
Deuteranopia (green-blind)
#3564AF
Tritanopia (blue-blind)
#855673
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #8a40b2;
/* rgb */ color: rgb(138, 64, 178);
/* oklch */ color: oklch(51.9% 0.180 311.6);
Tailwind
colors: {
  custom: {
    50: '#af79ca',
    500: '#8a40b2',
    950: '#000000',
  },
}
SCSS
$custom: #8a40b2;
$custom-light: #af79ca;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40b2",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 278.947,
    "s": 47.107,
    "l": 47.451
  },
  "oklch": {
    "l": 0.519,
    "c": 0.18004,
    "h": 311.6
  },
  "luminance": 0.12284
}

Semantic roles & 50–950 ramp

primary
#8A40B2
secondary
#9EC48A
accent
#D75180
background
#FBF7FC
surface
#F6EEF8
border
#D0C9D1
text
#110913
muted
#807B82

Preview Lab

Preview with #8A40B2

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

Preview Lab → · Contrast checker → · Palette generator →

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