#8040BA#8040BA

#8040BA is a mid, vivid violet. Relative luminance 0.118; OKLCH L 51.2% C 0.186 H 304.8°. Best body text is #FFFFFF at 6.25:1 contrast (WCAG AA passes).

Color values

HEX#8040BA
RGBrgb(128, 64, 186)
HSLhsl(271, 49%, 49%)
HSVhsv(271, 66%, 73%)
CMYKcmyk(31.2%, 65.6%, 0%, 27.1%)
CIE-LABlab(40.90, 50.13, -53.79)
CIE-LCHlch(40.90, 73.52, 312.98°)
OKLaboklab(51.24% 0.1059 -0.1525)
OKLCHoklch(51.24% 0.186 304.8)
XYZxyz(19.5964, 11.8013, 47.6903)
Luminance0.1180 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8040BA #7ABA40
analogous
#4340BA #8040BA #BA40B7
triadic
#8040BA #BA8040 #40BA80
tetradic
#8040BA #BA4340 #7ABA40 #40B7BA
square
#8040BA #BA4340 #7ABA40 #40B7BA
split-complementary
#8040BA #B7BA40 #40BA43
monochromatic
#41215F #61308C #8040BA #9E6BCC #BC99DC

Accessibility & contrast

On white

6.25
#8040BA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.36
#8040BA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8040BA
6.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8040BA#FFFFFF#000000##FFFFFF
##8040BA1.006.253.366.25
#FFFFFF6.251.0021.001.00
#0000003.3621.001.0021.00
##FFFFFF6.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FBE
Deuteranopia (green-blind)
#1C60B7
Tritanopia (blue-blind)
#755A77
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #8040ba;
/* rgb */ color: rgb(128, 64, 186);
/* oklch */ color: oklch(51.2% 0.186 304.8);
Tailwind
colors: {
  custom: {
    50: '#a979cf',
    500: '#8040ba',
    950: '#000000',
  },
}
SCSS
$custom: #8040ba;
$custom-light: #a979cf;
$custom-dark: #000000;
JSON
{
  "hex": "#8040ba",
  "rgb": {
    "r": 128,
    "g": 64,
    "b": 186
  },
  "hsl": {
    "h": 271.475,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.51236,
    "c": 0.18567,
    "h": 304.8
  },
  "luminance": 0.11801
}

Semantic roles & 50–950 ramp

primary
#8040BA
secondary
#A9C88E
accent
#D84F91
background
#FAF7FC
surface
#F4EEF9
border
#CEC9D2
text
#100914
muted
#7F7B82

Preview Lab

Preview with #8040BA

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

Preview Lab → · Contrast checker → · Palette generator →

#8040BA Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva