#8040D2#8040D2

#8040D2 is a mid, highly saturated violet. Relative luminance 0.129; OKLCH L 53.0% C 0.212 H 299.0°. Best body text is #FFFFFF at 5.86:1 contrast (WCAG AA passes).

Color values

HEX#8040D2
RGBrgb(128, 64, 210)
HSLhsl(266, 62%, 54%)
HSVhsv(266, 70%, 82%)
CMYKcmyk(39%, 69.5%, 0%, 17.6%)
CIE-LABlab(42.63, 55.99, -64.94)
CIE-LCHlch(42.63, 85.74, 310.77°)
OKLaboklab(53.02% 0.1027 -0.1853)
OKLCHoklch(53.02% 0.212 299)
XYZxyz(22.3654, 12.9088, 62.2736)
Luminance0.1291 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8040D2 #92D240
analogous
#4049D2 #8040D2 #C940D2
triadic
#8040D2 #D28040 #40D280
tetradic
#8040D2 #D24049 #92D240 #40D2C9
square
#8040D2 #D24049 #92D240 #40D2C9
split-complementary
#8040D2 #D2C940 #49D240
monochromatic
#461D7B #6229AC #8040D2 #A172DE #C2A3E9

Accessibility & contrast

On white

5.86
#8040D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.58
#8040D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8040D2
5.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8040D2#FFFFFF#000000##FFFFFF
##8040D21.005.863.585.86
#FFFFFF5.861.0021.001.00
#0000003.5821.001.0021.00
##FFFFFF5.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065D6
Deuteranopia (green-blind)
#0063CF
Tritanopia (blue-blind)
#6D6384
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #8040d2;
/* rgb */ color: rgb(128, 64, 210);
/* oklch */ color: oklch(53.0% 0.212 299.0);
Tailwind
colors: {
  custom: {
    50: '#ab7ae1',
    500: '#8040d2',
    950: '#000000',
  },
}
SCSS
$custom: #8040d2;
$custom-light: #ab7ae1;
$custom-dark: #000000;
JSON
{
  "hex": "#8040d2",
  "rgb": {
    "r": 128,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 266.301,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.53017,
    "c": 0.21189,
    "h": 299
  },
  "luminance": 0.12909
}

Semantic roles & 50–950 ramp

primary
#8040D2
secondary
#BBD698
accent
#E5439E
background
#FBF7FD
surface
#F6EEFB
border
#D0C9D4
text
#110915
muted
#807B83

Preview Lab

Preview with #8040D2

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

Preview Lab → · Contrast checker → · Palette generator →

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