#402C9E#402C9E

#402C9E is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.5% C 0.174 H 283.0°. Best body text is #FFFFFF at 10.14:1 contrast (WCAG AA passes).

Color values

HEX#402C9E
RGBrgb(64, 44, 158)
HSLhsl(251, 56%, 40%)
HSVhsv(251, 72%, 62%)
CMYKcmyk(59.5%, 72.2%, 0%, 38%)
CIE-LABlab(27.74, 40.93, -58.79)
CIE-LCHlch(27.74, 71.64, 304.85°)
OKLaboklab(39.48% 0.0392 -0.1693)
OKLCHoklch(39.48% 0.174 283)
XYZxyz(9.1847, 5.3594, 32.8916)
Luminance0.0536 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C9E #8A9E2C
analogous
#2C519E #402C9E #792C9E
triadic
#402C9E #9E402C #2C9E40
tetradic
#402C9E #9E2C51 #8A9E2C #2C9E79
square
#402C9E #9E2C51 #8A9E2C #2C9E79
split-complementary
#402C9E #9E792C #519E2C
monochromatic
#19113E #2D1F6E #402C9E #563EC9 #806ED7

Accessibility & contrast

On white

10.14
#402C9E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#402C9E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402C9E
10.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C9E#FFFFFF#000000##FFFFFF
##402C9E1.0010.142.0710.14
#FFFFFF10.141.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.141.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402c9e;
/* rgb */ color: rgb(64, 44, 158);
/* oklch */ color: oklch(39.5% 0.174 283.0);
Tailwind
colors: {
  custom: {
    50: '#8067bc',
    500: '#402c9e',
    950: '#000000',
  },
}
SCSS
$custom: #402c9e;
$custom-light: #8067bc;
$custom-dark: #000000;
JSON
{
  "hex": "#402c9e",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 158
  },
  "hsl": {
    "h": 250.526,
    "s": 56.436,
    "l": 39.608
  },
  "oklch": {
    "l": 0.39483,
    "c": 0.17381,
    "h": 283
  },
  "luminance": 0.0536
}

Semantic roles & 50–950 ramp

primary
#402C9E
secondary
#AFBE68
accent
#E048C5
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #402C9E

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

Preview Lab → · Contrast checker → · Palette generator →

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