#8040C2#8040C2

#8040C2 is a mid, vivid violet. Relative luminance 0.122; OKLCH L 51.8% C 0.194 H 302.7°. Best body text is #FFFFFF at 6.12:1 contrast (WCAG AA passes).

Color values

HEX#8040C2
RGBrgb(128, 64, 194)
HSLhsl(270, 52%, 51%)
HSVhsv(270, 67%, 76%)
CMYKcmyk(34%, 67%, 0%, 23.9%)
CIE-LABlab(41.46, 52.06, -57.57)
CIE-LCHlch(41.46, 77.61, 312.12°)
OKLaboklab(51.81% 0.105 -0.1636)
OKLCHoklch(51.81% 0.194 302.7)
XYZxyz(20.4708, 12.1510, 52.2954)
Luminance0.1215 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8040C2 #82C240
analogous
#4041C2 #8040C2 #C140C2
triadic
#8040C2 #C28040 #40C280
tetradic
#8040C2 #C24041 #82C240 #40C2C1
square
#8040C2 #C24041 #82C240 #40C2C1
split-complementary
#8040C2 #C2C140 #41C240
monochromatic
#432167 #623095 #8040C2 #9F6ED1 #BE9DE0

Accessibility & contrast

On white

6.12
#8040C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.43
#8040C2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8040C2
6.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8040C2#FFFFFF#000000##FFFFFF
##8040C21.006.123.436.12
#FFFFFF6.121.0021.001.00
#0000003.4321.001.0021.00
##FFFFFF6.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061C6
Deuteranopia (green-blind)
#0161BF
Tritanopia (blue-blind)
#735D7C
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #8040c2;
/* rgb */ color: rgb(128, 64, 194);
/* oklch */ color: oklch(51.8% 0.194 302.7);
Tailwind
colors: {
  custom: {
    50: '#aa79d5',
    500: '#8040c2',
    950: '#000000',
  },
}
SCSS
$custom: #8040c2;
$custom-light: #aa79d5;
$custom-dark: #000000;
JSON
{
  "hex": "#8040c2",
  "rgb": {
    "r": 128,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 269.538,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.51812,
    "c": 0.19445,
    "h": 302.7
  },
  "luminance": 0.12151
}

Semantic roles & 50–950 ramp

primary
#8040C2
secondary
#AFCC92
accent
#DB4D95
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #8040C2

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

Preview Lab → · Contrast checker → · Palette generator →

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