#402D9E#402D9E

#402D9E is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.6% C 0.173 H 282.8°. Best body text is #FFFFFF at 10.06:1 contrast (WCAG AA passes).

Color values

HEX#402D9E
RGBrgb(64, 45, 158)
HSLhsl(250, 56%, 40%)
HSVhsv(250, 72%, 62%)
CMYKcmyk(59.5%, 71.5%, 0%, 38%)
CIE-LABlab(27.94, 40.37, -58.46)
CIE-LCHlch(27.94, 71.04, 304.63°)
OKLaboklab(39.63% 0.0383 -0.1684)
OKLCHoklch(39.63% 0.173 282.8)
XYZxyz(9.2224, 5.4348, 32.9042)
Luminance0.0544 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D9E #8B9E2D
analogous
#2D539E #402D9E #782D9E
triadic
#402D9E #9E402D #2D9E40
tetradic
#402D9E #9E2D53 #8B9E2D #2D9E78
square
#402D9E #9E2D53 #8B9E2D #2D9E78
split-complementary
#402D9E #9E782D #539E2D
monochromatic
#19123F #2D1F6E #402D9E #5740C9 #816FD6

Accessibility & contrast

On white

10.06
#402D9E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#402D9E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D9E
10.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D9E#FFFFFF#000000##FFFFFF
##402D9E1.0010.062.0910.06
#FFFFFF10.061.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A1
Deuteranopia (green-blind)
#003E9C
Tritanopia (blue-blind)
#044B62
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #402d9e;
/* rgb */ color: rgb(64, 45, 158);
/* oklch */ color: oklch(39.6% 0.173 282.8);
Tailwind
colors: {
  custom: {
    50: '#8068bc',
    500: '#402d9e',
    950: '#000000',
  },
}
SCSS
$custom: #402d9e;
$custom-light: #8068bc;
$custom-dark: #000000;
JSON
{
  "hex": "#402d9e",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 158
  },
  "hsl": {
    "h": 250.088,
    "s": 55.665,
    "l": 39.804
  },
  "oklch": {
    "l": 0.39629,
    "c": 0.17268,
    "h": 282.8
  },
  "luminance": 0.05435
}

Semantic roles & 50–950 ramp

primary
#402D9E
secondary
#AFBD69
accent
#DF49C6
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402D9E

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

Preview Lab → · Contrast checker → · Palette generator →

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