#8040C4#8040C4

#8040C4 is a mid, vivid violet. Relative luminance 0.122; OKLCH L 52.0% C 0.197 H 302.2°. Best body text is #FFFFFF at 6.09:1 contrast (WCAG AA passes).

Color values

HEX#8040C4
RGBrgb(128, 64, 196)
HSLhsl(269, 53%, 51%)
HSVhsv(269, 67%, 77%)
CMYKcmyk(34.7%, 67.3%, 0%, 23.1%)
CIE-LABlab(41.60, 52.55, -58.50)
CIE-LCHlch(41.60, 78.63, 311.93°)
OKLaboklab(51.96% 0.1048 -0.1664)
OKLCHoklch(51.96% 0.197 302.2)
XYZxyz(20.6969, 12.2415, 53.4863)
Luminance0.1224 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8040C4 #84C440
analogous
#4042C4 #8040C4 #C240C4
triadic
#8040C4 #C48040 #40C480
tetradic
#8040C4 #C44042 #84C440 #40C4C2
square
#8040C4 #C44042 #84C440 #40C4C2
split-complementary
#8040C4 #C4C240 #42C440
monochromatic
#442069 #622F98 #8040C4 #9F6FD2 #BE9EE1

Accessibility & contrast

On white

6.09
#8040C4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.45
#8040C4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8040C4
6.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8040C4#FFFFFF#000000##FFFFFF
##8040C41.006.093.456.09
#FFFFFF6.091.0021.001.00
#0000003.4521.001.0021.00
##FFFFFF6.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061C8
Deuteranopia (green-blind)
#0062C1
Tritanopia (blue-blind)
#725E7D
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #8040c4;
/* rgb */ color: rgb(128, 64, 196);
/* oklch */ color: oklch(52.0% 0.197 302.2);
Tailwind
colors: {
  custom: {
    50: '#aa79d7',
    500: '#8040c4',
    950: '#000000',
  },
}
SCSS
$custom: #8040c4;
$custom-light: #aa79d7;
$custom-dark: #000000;
JSON
{
  "hex": "#8040c4",
  "rgb": {
    "r": 128,
    "g": 64,
    "b": 196
  },
  "hsl": {
    "h": 269.091,
    "s": 52.8,
    "l": 50.98
  },
  "oklch": {
    "l": 0.51959,
    "c": 0.19664,
    "h": 302.2
  },
  "luminance": 0.12242
}

Semantic roles & 50–950 ramp

primary
#8040C4
secondary
#B1CD93
accent
#DC4C96
background
#FAF7FD
surface
#F5EEFA
border
#CFC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #8040C4

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

Preview Lab → · Contrast checker → · Palette generator →

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