#402E8D#402E8D

#402E8D is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.2% C 0.149 H 285.6°. Best body text is #FFFFFF at 10.53:1 contrast (WCAG AA passes).

Color values

HEX#402E8D
RGBrgb(64, 46, 141)
HSLhsl(251, 51%, 37%)
HSVhsv(251, 67%, 55%)
CMYKcmyk(54.6%, 67.4%, 0%, 44.7%)
CIE-LABlab(26.64, 34.39, -50.14)
CIE-LCHlch(26.64, 60.80, 304.45°)
OKLaboklab(38.23% 0.0402 -0.144)
OKLCHoklch(38.23% 0.15 285.6)
XYZxyz(7.8976, 4.9666, 25.7366)
Luminance0.0497 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E8D #7B8D2E
analogous
#2E4C8D #402E8D #702E8D
triadic
#402E8D #8D402E #2E8D40
tetradic
#402E8D #8D2E4C #7B8D2E #2E8D70
square
#402E8D #8D2E4C #7B8D2E #2E8D70
split-complementary
#402E8D #8D702E #4C8D2E
monochromatic
#161031 #2B1F5F #402E8D #553DBB #7B68CE

Accessibility & contrast

On white

10.53
#402E8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.99
#402E8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E8D
10.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E8D#FFFFFF#000000##FFFFFF
##402E8D1.0010.531.9910.53
#FFFFFF10.531.0021.001.00
#0000001.9921.001.0021.00
##FFFFFF10.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004290
Deuteranopia (green-blind)
#003C8B
Tritanopia (blue-blind)
#204659
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #402e8d;
/* rgb */ color: rgb(64, 46, 141);
/* oklch */ color: oklch(38.2% 0.149 285.6);
Tailwind
colors: {
  custom: {
    50: '#7d68af',
    500: '#402e8d',
    950: '#000000',
  },
}
SCSS
$custom: #402e8d;
$custom-light: #7d68af;
$custom-dark: #000000;
JSON
{
  "hex": "#402e8d",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 141
  },
  "hsl": {
    "h": 251.368,
    "s": 50.802,
    "l": 36.667
  },
  "oklch": {
    "l": 0.38229,
    "c": 0.1495,
    "h": 285.6
  },
  "luminance": 0.04967
}

Semantic roles & 50–950 ramp

primary
#402E8D
secondary
#A5B562
accent
#DA4EC0
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402E8D

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

Preview Lab → · Contrast checker → · Palette generator →

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