#402E96#402E96

#402E96 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.0% C 0.161 H 284.0°. Best body text is #FFFFFF at 10.25:1 contrast (WCAG AA passes).

Color values

HEX#402E96
RGBrgb(64, 46, 150)
HSLhsl(250, 53%, 38%)
HSVhsv(250, 69%, 59%)
CMYKcmyk(57.3%, 69.3%, 0%, 41.2%)
CIE-LABlab(27.42, 37.25, -54.41)
CIE-LCHlch(27.42, 65.94, 304.40°)
OKLaboklab(39.04% 0.0389 -0.1565)
OKLCHoklch(39.04% 0.161 284)
XYZxyz(8.5947, 5.2455, 29.4078)
Luminance0.0525 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E96 #84962E
analogous
#2E5096 #402E96 #742E96
triadic
#402E96 #96402E #2E9640
tetradic
#402E96 #962E50 #84962E #2E9674
square
#402E96 #962E50 #84962E #2E9674
split-complementary
#402E96 #96742E #50962E
monochromatic
#181138 #2C2067 #402E96 #553EC4 #7E6CD2

Accessibility & contrast

On white

10.25
#402E96 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#402E96 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E96
10.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E96#FFFFFF#000000##FFFFFF
##402E961.0010.252.0510.25
#FFFFFF10.251.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004499
Deuteranopia (green-blind)
#003D94
Tritanopia (blue-blind)
#15495E
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #402e96;
/* rgb */ color: rgb(64, 46, 150);
/* oklch */ color: oklch(39.0% 0.161 284.0);
Tailwind
colors: {
  custom: {
    50: '#7e68b6',
    500: '#402e96',
    950: '#000000',
  },
}
SCSS
$custom: #402e96;
$custom-light: #7e68b6;
$custom-dark: #000000;
JSON
{
  "hex": "#402e96",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 150
  },
  "hsl": {
    "h": 250.385,
    "s": 53.061,
    "l": 38.431
  },
  "oklch": {
    "l": 0.39036,
    "c": 0.16128,
    "h": 284
  },
  "luminance": 0.05246
}

Semantic roles & 50–950 ramp

primary
#402E96
secondary
#ABB967
accent
#DC4BC3
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402E96

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

Preview Lab → · Contrast checker → · Palette generator →

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