#402E79#402E79

#402E79 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 36.5% C 0.122 H 290.1°. Best body text is #FFFFFF at 11.14:1 contrast (WCAG AA passes).

Color values

HEX#402E79
RGBrgb(64, 46, 121)
HSLhsl(254, 45%, 33%)
HSVhsv(254, 62%, 47%)
CMYKcmyk(47.1%, 62%, 0%, 52.5%)
CIE-LABlab(25.03, 28.06, -40.23)
CIE-LCHlch(25.03, 49.05, 304.90°)
OKLaboklab(36.55% 0.0419 -0.1148)
OKLCHoklch(36.55% 0.122 290.1)
XYZxyz(6.5416, 4.4242, 18.5947)
Luminance0.0442 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E79 #67792E
analogous
#2E4179 #402E79 #652E79
triadic
#402E79 #79402E #2E7940
tetradic
#402E79 #792E41 #67792E #2E7965
square
#402E79 #792E41 #67792E #2E7965
split-complementary
#402E79 #79652E #41792E
monochromatic
#110C20 #291D4D #402E79 #573FA5 #775FC2

Accessibility & contrast

On white

11.14
#402E79 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.88
#402E79 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E79
11.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E79#FFFFFF#000000##FFFFFF
##402E791.0011.141.8811.14
#FFFFFF11.141.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D7B
Deuteranopia (green-blind)
#003A77
Tritanopia (blue-blind)
#2F3F4F
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402e79;
/* rgb */ color: rgb(64, 46, 121);
/* oklch */ color: oklch(36.5% 0.122 290.1);
Tailwind
colors: {
  custom: {
    50: '#7a67a0',
    500: '#402e79',
    950: '#000000',
  },
}
SCSS
$custom: #402e79;
$custom-light: #7a67a0;
$custom-dark: #000000;
JSON
{
  "hex": "#402e79",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 121
  },
  "hsl": {
    "h": 254.4,
    "s": 44.91,
    "l": 32.745
  },
  "oklch": {
    "l": 0.36549,
    "c": 0.12225,
    "h": 290.1
  },
  "luminance": 0.04424
}

Semantic roles & 50–950 ramp

primary
#402E79
secondary
#96A95A
accent
#D553B6
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09060F
muted
#7B7A7E

Preview Lab

Preview with #402E79

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

Preview Lab → · Contrast checker → · Palette generator →

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