#402D79#402D79

#402D79 is a dark, vivid violet. Relative luminance 0.043; OKLCH L 36.4% C 0.124 H 290.4°. Best body text is #FFFFFF at 11.23:1 contrast (WCAG AA passes).

Color values

HEX#402D79
RGBrgb(64, 45, 121)
HSLhsl(255, 46%, 33%)
HSVhsv(255, 63%, 47%)
CMYKcmyk(47.1%, 62.8%, 0%, 52.5%)
CIE-LABlab(24.79, 28.70, -40.61)
CIE-LCHlch(24.79, 49.73, 305.24°)
OKLaboklab(36.37% 0.0432 -0.116)
OKLCHoklch(36.37% 0.124 290.4)
XYZxyz(6.5030, 4.3470, 18.5819)
Luminance0.0435 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D79 #66792D
analogous
#2D4079 #402D79 #662D79
triadic
#402D79 #79402D #2D7940
tetradic
#402D79 #792D40 #66792D #2D7966
square
#402D79 #792D40 #66792D #2D7966
split-complementary
#402D79 #79662D #40792D
monochromatic
#110C20 #281C4C #402D79 #583EA6 #775DC3

Accessibility & contrast

On white

11.23
#402D79 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#402D79 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D79
11.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D79#FFFFFF#000000##FFFFFF
##402D791.0011.231.8711.23
#FFFFFF11.231.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C7B
Deuteranopia (green-blind)
#003977
Tritanopia (blue-blind)
#2F3E4E
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402d79;
/* rgb */ color: rgb(64, 45, 121);
/* oklch */ color: oklch(36.4% 0.124 290.4);
Tailwind
colors: {
  custom: {
    50: '#7a67a0',
    500: '#402d79',
    950: '#000000',
  },
}
SCSS
$custom: #402d79;
$custom-light: #7a67a0;
$custom-dark: #000000;
JSON
{
  "hex": "#402d79",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 121
  },
  "hsl": {
    "h": 255,
    "s": 45.783,
    "l": 32.549
  },
  "oklch": {
    "l": 0.36373,
    "c": 0.12374,
    "h": 290.4
  },
  "luminance": 0.04347
}

Semantic roles & 50–950 ramp

primary
#402D79
secondary
#95A958
accent
#D552B5
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09060F
muted
#7B7A7E

Preview Lab

Preview with #402D79

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

Preview Lab → · Contrast checker → · Palette generator →

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