#8040BF#8040BF

#8040BF is a mid, vivid violet. Relative luminance 0.120; OKLCH L 51.6% C 0.191 H 303.4°. Best body text is #FFFFFF at 6.17:1 contrast (WCAG AA passes).

Color values

HEX#8040BF
RGBrgb(128, 64, 191)
HSLhsl(270, 50%, 50%)
HSVhsv(270, 66%, 75%)
CMYKcmyk(33%, 66.5%, 0%, 25.1%)
CIE-LABlab(41.24, 51.33, -56.16)
CIE-LCHlch(41.24, 76.08, 312.43°)
OKLaboklab(51.59% 0.1054 -0.1595)
OKLCHoklch(51.59% 0.191 303.4)
XYZxyz(20.1373, 12.0176, 50.5389)
Luminance0.1202 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8040BF #7FBF40
analogous
#4040BF #8040BF #BF40BF
triadic
#8040BF #BF8040 #40BF80
tetradic
#8040BF #BF4040 #7FBF40 #40BFBF
square
#8040BF #BF4040 #7FBF40 #40BFBF
split-complementary
#8040BF #BFBF40 #40BF40
monochromatic
#432163 #613191 #8040BF #9E6ECE #BD9CDE

Accessibility & contrast

On white

6.17
#8040BF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.40
#8040BF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8040BF
6.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8040BF#FFFFFF#000000##FFFFFF
##8040BF1.006.173.406.17
#FFFFFF6.171.0021.001.00
#0000003.4021.001.0021.00
##FFFFFF6.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060C3
Deuteranopia (green-blind)
#0F61BC
Tritanopia (blue-blind)
#745C7A
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #8040bf;
/* rgb */ color: rgb(128, 64, 191);
/* oklch */ color: oklch(51.6% 0.191 303.4);
Tailwind
colors: {
  custom: {
    50: '#aa79d3',
    500: '#8040bf',
    950: '#000000',
  },
}
SCSS
$custom: #8040bf;
$custom-light: #aa79d3;
$custom-dark: #000000;
JSON
{
  "hex": "#8040bf",
  "rgb": {
    "r": 128,
    "g": 64,
    "b": 191
  },
  "hsl": {
    "h": 270.236,
    "s": 49.804,
    "l": 50
  },
  "oklch": {
    "l": 0.51594,
    "c": 0.19116,
    "h": 303.4
  },
  "luminance": 0.12018
}

Semantic roles & 50–950 ramp

primary
#8040BF
secondary
#ADCA91
accent
#D94E93
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #8040BF

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

Preview Lab → · Contrast checker → · Palette generator →

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