#402A71#402A71

#402A71 is a dark, moderate violet. Relative luminance 0.039; OKLCH L 35.2% C 0.117 H 293.8°. Best body text is #FFFFFF at 11.75:1 contrast (WCAG AA passes).

Color values

HEX#402A71
RGBrgb(64, 42, 113)
HSLhsl(259, 46%, 30%)
HSVhsv(259, 63%, 44%)
CMYKcmyk(43.4%, 62.8%, 0%, 55.7%)
CIE-LABlab(23.47, 28.11, -37.64)
CIE-LCHlch(23.47, 46.98, 306.75°)
OKLaboklab(35.21% 0.0473 -0.1072)
OKLCHoklch(35.21% 0.117 293.8)
XYZxyz(5.9222, 3.9380, 16.0677)
Luminance0.0394 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402A71 #5B712A
analogous
#2A3771 #402A71 #632A71
triadic
#402A71 #71402A #2A7140
tetradic
#402A71 #712A37 #5B712A #2A7163
square
#402A71 #712A37 #5B712A #2A7163
split-complementary
#402A71 #71632A #37712A
monochromatic
#0D0918 #271944 #402A71 #593B9E #7655C0

Accessibility & contrast

On white

11.75
#402A71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#402A71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402A71
11.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402A71#FFFFFF#000000##FFFFFF
##402A711.0011.751.7911.75
#FFFFFF11.751.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003973
Deuteranopia (green-blind)
#04376F
Tritanopia (blue-blind)
#333A49
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #402a71;
/* rgb */ color: rgb(64, 42, 113);
/* oklch */ color: oklch(35.2% 0.117 293.8);
Tailwind
colors: {
  custom: {
    50: '#79649a',
    500: '#402a71',
    950: '#000000',
  },
}
SCSS
$custom: #402a71;
$custom-light: #79649a;
$custom-dark: #000000;
JSON
{
  "hex": "#402a71",
  "rgb": {
    "r": 64,
    "g": 42,
    "b": 113
  },
  "hsl": {
    "h": 258.592,
    "s": 45.806,
    "l": 30.392
  },
  "oklch": {
    "l": 0.35214,
    "c": 0.1172,
    "h": 293.8
  },
  "luminance": 0.03938
}

Semantic roles & 50–950 ramp

primary
#402A71
secondary
#8AA354
accent
#D552AD
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09050E
muted
#7B7A7E

Preview Lab

Preview with #402A71

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

Preview Lab → · Contrast checker → · Palette generator →

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