#8040CB#8040CB

#8040CB is a mid, highly saturated violet. Relative luminance 0.126; OKLCH L 52.5% C 0.204 H 300.5°. Best body text is #FFFFFF at 5.98:1 contrast (WCAG AA passes).

Color values

HEX#8040CB
RGBrgb(128, 64, 203)
HSLhsl(268, 57%, 52%)
HSVhsv(268, 68%, 80%)
CMYKcmyk(36.9%, 68.5%, 0%, 20.4%)
CIE-LABlab(42.10, 54.26, -61.74)
CIE-LCHlch(42.10, 82.20, 311.31°)
OKLaboklab(52.48% 0.1038 -0.1759)
OKLCHoklch(52.48% 0.204 300.5)
XYZxyz(21.5123, 12.5676, 57.7808)
Luminance0.1257 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8040CB #8BCB40
analogous
#4045CB #8040CB #C640CB
triadic
#8040CB #CB8040 #40CB80
tetradic
#8040CB #CB4045 #8BCB40 #40CBC6
square
#8040CB #CB4045 #8BCB40 #40CBC6
split-complementary
#8040CB #CBC640 #45CB40
monochromatic
#451F72 #622CA2 #8040CB #A070D8 #C0A0E5

Accessibility & contrast

On white

5.98
#8040CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.51
#8040CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8040CB
5.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8040CB#FFFFFF#000000##FFFFFF
##8040CB1.005.983.515.98
#FFFFFF5.981.0021.001.00
#0000003.5121.001.0021.00
##FFFFFF5.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0063CF
Deuteranopia (green-blind)
#0062C8
Tritanopia (blue-blind)
#6F6181
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #8040cb;
/* rgb */ color: rgb(128, 64, 203);
/* oklch */ color: oklch(52.5% 0.204 300.5);
Tailwind
colors: {
  custom: {
    50: '#ab79dc',
    500: '#8040cb',
    950: '#000000',
  },
}
SCSS
$custom: #8040cb;
$custom-light: #ab79dc;
$custom-dark: #000000;
JSON
{
  "hex": "#8040cb",
  "rgb": {
    "r": 128,
    "g": 64,
    "b": 203
  },
  "hsl": {
    "h": 267.626,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.52482,
    "c": 0.20428,
    "h": 300.5
  },
  "luminance": 0.12568
}

Semantic roles & 50–950 ramp

primary
#8040CB
secondary
#B6D295
accent
#E0479A
background
#FBF7FD
surface
#F6EEFB
border
#D0C9D4
text
#110915
muted
#807B83

Preview Lab

Preview with #8040CB

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

Preview Lab → · Contrast checker → · Palette generator →

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