#402C71#402C71

#402C71 is a dark, moderate violet. Relative luminance 0.041; OKLCH L 35.6% C 0.114 H 293.1°. Best body text is #FFFFFF at 11.56:1 contrast (WCAG AA passes).

Color values

HEX#402C71
RGBrgb(64, 44, 113)
HSLhsl(257, 44%, 31%)
HSVhsv(257, 61%, 44%)
CMYKcmyk(43.4%, 61.1%, 0%, 55.7%)
CIE-LABlab(23.95, 26.85, -36.87)
CIE-LCHlch(23.95, 45.61, 306.06°)
OKLaboklab(35.57% 0.0447 -0.105)
OKLCHoklch(35.57% 0.114 293.1)
XYZxyz(5.9949, 4.0834, 16.0919)
Luminance0.0408 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C71 #5D712C
analogous
#2C3A71 #402C71 #622C71
triadic
#402C71 #71402C #2C7140
tetradic
#402C71 #712C3A #5D712C #2C7162
square
#402C71 #712C3A #5D712C #2C7162
split-complementary
#402C71 #71622C #3A712C
monochromatic
#0E0A19 #271B45 #402C71 #593D9D #7659BE

Accessibility & contrast

On white

11.56
#402C71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#402C71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402C71
11.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C71#FFFFFF#000000##FFFFFF
##402C711.0011.561.8211.56
#FFFFFF11.561.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#023A73
Deuteranopia (green-blind)
#09386F
Tritanopia (blue-blind)
#333B4A
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #402c71;
/* rgb */ color: rgb(64, 44, 113);
/* oklch */ color: oklch(35.6% 0.114 293.1);
Tailwind
colors: {
  custom: {
    50: '#79669a',
    500: '#402c71',
    950: '#000000',
  },
}
SCSS
$custom: #402c71;
$custom-light: #79669a;
$custom-dark: #000000;
JSON
{
  "hex": "#402c71",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 113
  },
  "hsl": {
    "h": 257.391,
    "s": 43.949,
    "l": 30.784
  },
  "oklch": {
    "l": 0.35565,
    "c": 0.11408,
    "h": 293.1
  },
  "luminance": 0.04084
}

Semantic roles & 50–950 ramp

primary
#402C71
secondary
#8CA356
accent
#D454AF
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09060E
muted
#7B7A7E

Preview Lab

Preview with #402C71

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

Preview Lab → · Contrast checker → · Palette generator →

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