#402E9A#402E9A

#402E9A is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.4% C 0.166 H 283.3°. Best body text is #FFFFFF at 10.12:1 contrast (WCAG AA passes).

Color values

HEX#402E9A
RGBrgb(64, 46, 154)
HSLhsl(250, 54%, 39%)
HSVhsv(250, 70%, 60%)
CMYKcmyk(58.4%, 70.1%, 0%, 39.6%)
CIE-LABlab(27.78, 38.53, -56.27)
CIE-LCHlch(27.78, 68.20, 304.40°)
OKLaboklab(39.4% 0.0382 -0.162)
OKLCHoklch(39.4% 0.166 283.3)
XYZxyz(8.9223, 5.3765, 31.1332)
Luminance0.0538 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E9A #889A2E
analogous
#2E529A #402E9A #762E9A
triadic
#402E9A #9A402E #2E9A40
tetradic
#402E9A #9A2E52 #889A2E #2E9A76
square
#402E9A #9A2E52 #889A2E #2E9A76
split-complementary
#402E9A #9A762E #529A2E
monochromatic
#19123C #2C206B #402E9A #563FC6 #7F6FD4

Accessibility & contrast

On white

10.12
#402E9A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#402E9A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E9A
10.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E9A#FFFFFF#000000##FFFFFF
##402E9A1.0010.122.0810.12
#FFFFFF10.121.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459D
Deuteranopia (green-blind)
#003E98
Tritanopia (blue-blind)
#0E4A60
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402e9a;
/* rgb */ color: rgb(64, 46, 154);
/* oklch */ color: oklch(39.4% 0.166 283.3);
Tailwind
colors: {
  custom: {
    50: '#7f68b9',
    500: '#402e9a',
    950: '#000000',
  },
}
SCSS
$custom: #402e9a;
$custom-light: #7f68b9;
$custom-dark: #000000;
JSON
{
  "hex": "#402e9a",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 154
  },
  "hsl": {
    "h": 250,
    "s": 54,
    "l": 39.216
  },
  "oklch": {
    "l": 0.39404,
    "c": 0.16643,
    "h": 283.3
  },
  "luminance": 0.05377
}

Semantic roles & 50–950 ramp

primary
#402E9A
secondary
#ADBB69
accent
#DD4AC5
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402E9A

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

Preview Lab → · Contrast checker → · Palette generator →

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