#402884#402884

#402884 is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.5% C 0.145 H 289.1°. Best body text is #FFFFFF at 11.32:1 contrast (WCAG AA passes).

Color values

HEX#402884
RGBrgb(64, 40, 132)
HSLhsl(256, 53%, 34%)
HSVhsv(256, 70%, 52%)
CMYKcmyk(51.5%, 69.7%, 0%, 48.2%)
CIE-LABlab(24.55, 35.14, -47.93)
CIE-LCHlch(24.55, 59.44, 306.25°)
OKLaboklab(36.49% 0.0476 -0.1375)
OKLCHoklch(36.49% 0.146 289.1)
XYZxyz(7.0368, 4.2732, 22.2794)
Luminance0.0427 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402884 #6C8428
analogous
#283E84 #402884 #6E2884
triadic
#402884 #844028 #288440
tetradic
#402884 #84283E #6C8428 #28846E
square
#402884 #84283E #6C8428 #28846E
split-complementary
#402884 #846E28 #3E8428
monochromatic
#120C26 #291A55 #402884 #5736B3 #785ACD

Accessibility & contrast

On white

11.32
#402884 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#402884 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402884
11.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402884#FFFFFF#000000##FFFFFF
##4028841.0011.321.8511.32
#FFFFFF11.321.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C87
Deuteranopia (green-blind)
#003882
Tritanopia (blue-blind)
#283F52
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #402884;
/* rgb */ color: rgb(64, 40, 132);
/* oklch */ color: oklch(36.5% 0.145 289.1);
Tailwind
colors: {
  custom: {
    50: '#7c64a9',
    500: '#402884',
    950: '#000000',
  },
}
SCSS
$custom: #402884;
$custom-light: #7c64a9;
$custom-dark: #000000;
JSON
{
  "hex": "#402884",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 132
  },
  "hsl": {
    "h": 255.652,
    "s": 53.488,
    "l": 33.725
  },
  "oklch": {
    "l": 0.36487,
    "c": 0.1455,
    "h": 289.1
  },
  "luminance": 0.04274
}

Semantic roles & 50–950 ramp

primary
#402884
secondary
#9AB256
accent
#DD4BB7
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0510
muted
#7C7A7F

Preview Lab

Preview with #402884

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

Preview Lab → · Contrast checker → · Palette generator →

#402884 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva