#8A40C5#8A40C5

#8A40C5 is a mid, vivid violet. Relative luminance 0.131; OKLCH L 53.2% C 0.200 H 306.2°. Best body text is #FFFFFF at 5.80:1 contrast (WCAG AA passes).

Color values

HEX#8A40C5
RGBrgb(138, 64, 197)
HSLhsl(273, 53%, 51%)
HSVhsv(273, 68%, 77%)
CMYKcmyk(29.9%, 67.5%, 0%, 22.7%)
CIE-LABlab(42.92, 54.85, -56.89)
CIE-LCHlch(42.92, 79.03, 313.96°)
OKLaboklab(53.2% 0.1182 -0.1613)
OKLCHoklch(53.2% 0.2 306.2)
XYZxyz(22.3905, 13.1015, 54.1618)
Luminance0.1310 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40C5 #7BC540
analogous
#4740C5 #8A40C5 #C540BE
triadic
#8A40C5 #C58A40 #40C58A
tetradic
#8A40C5 #C54740 #7BC540 #40BEC5
square
#8A40C5 #C54740 #7BC540 #40BEC5
split-complementary
#8A40C5 #BEC540 #40C547
monochromatic
#49206A #6A2F99 #8A40C5 #A76FD3 #C49EE2

Accessibility & contrast

On white

5.80
#8A40C5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.62
#8A40C5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40C5
5.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40C5#FFFFFF#000000##FFFFFF
##8A40C51.005.803.625.80
#FFFFFF5.801.0021.001.00
#0000003.6221.001.0021.00
##FFFFFF5.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0063C9
Deuteranopia (green-blind)
#1A66C2
Tritanopia (blue-blind)
#805D7D
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #8a40c5;
/* rgb */ color: rgb(138, 64, 197);
/* oklch */ color: oklch(53.2% 0.200 306.2);
Tailwind
colors: {
  custom: {
    50: '#b17ad7',
    500: '#8a40c5',
    950: '#000000',
  },
}
SCSS
$custom: #8a40c5;
$custom-light: #b17ad7;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40c5",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 197
  },
  "hsl": {
    "h": 273.383,
    "s": 53.414,
    "l": 51.176
  },
  "oklch": {
    "l": 0.53198,
    "c": 0.19996,
    "h": 306.2
  },
  "luminance": 0.13101
}

Semantic roles & 50–950 ramp

primary
#8A40C5
secondary
#ADCE93
accent
#DD4B8C
background
#FBF7FD
surface
#F6EEFA
border
#D0C9D3
text
#110A14
muted
#807C83

Preview Lab

Preview with #8A40C5

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

Preview Lab → · Contrast checker → · Palette generator →

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