#402A80#402A80

#402A80 is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.5% C 0.138 H 289.6°. Best body text is #FFFFFF at 11.29:1 contrast (WCAG AA passes).

Color values

HEX#402A80
RGBrgb(64, 42, 128)
HSLhsl(255, 51%, 33%)
HSVhsv(255, 67%, 50%)
CMYKcmyk(50%, 67.2%, 0%, 49.8%)
CIE-LABlab(24.65, 32.72, -45.26)
CIE-LCHlch(24.65, 55.85, 305.87°)
OKLaboklab(36.45% 0.046 -0.1296)
OKLCHoklch(36.45% 0.138 289.6)
XYZxyz(6.8375, 4.3042, 20.8884)
Luminance0.0430 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A80 #6A802A
analogous
#2A3F80 #402A80 #6B2A80
triadic
#402A80 #80402A #2A8040
tetradic
#402A80 #802A3F #6A802A #2A806B
square
#402A80 #802A3F #6A802A #2A806B
split-complementary
#402A80 #806B2A #3F802A
monochromatic
#120C24 #291B52 #402A80 #5739AE #775BC9

Accessibility & contrast

On white

11.29
#402A80 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.86
#402A80 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A80
11.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A80#FFFFFF#000000##FFFFFF
##402A801.0011.291.8611.29
#FFFFFF11.291.0021.001.00
#0000001.8621.001.0021.00
##FFFFFF11.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C83
Deuteranopia (green-blind)
#00387E
Tritanopia (blue-blind)
#2B3F51
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402a80;
/* rgb */ color: rgb(64, 42, 128);
/* oklch */ color: oklch(36.5% 0.138 289.6);
Tailwind
colors: {
  custom: {
    50: '#7b65a6',
    500: '#402a80',
    950: '#000000',
  },
}
SCSS
$custom: #402a80;
$custom-light: #7b65a6;
$custom-dark: #000000;
JSON
{
  "hex": "#402a80",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 128
  },
  "hsl": {
    "h": 255.349,
    "s": 50.588,
    "l": 33.333
  },
  "oklch": {
    "l": 0.36451,
    "c": 0.13756,
    "h": 289.6
  },
  "luminance": 0.04304
}

Semantic roles & 50–950 ramp

primary
#402A80
secondary
#98AF57
accent
#DA4EB6
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A050F
muted
#7C7A7F

Preview Lab

Preview with #402A80

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

Preview Lab → · Contrast checker → · Palette generator →

#402A80 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva