#402071#402071

#402071 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.6% C 0.132 H 296.8°. Best body text is #FFFFFF at 12.63:1 contrast (WCAG AA passes).

Color values

HEX#402071
RGBrgb(64, 32, 113)
HSLhsl(264, 56%, 28%)
HSVhsv(264, 72%, 44%)
CMYKcmyk(43.4%, 71.7%, 0%, 55.7%)
CIE-LABlab(21.26, 34.06, -41.21)
CIE-LCHlch(21.26, 53.47, 309.57°)
OKLaboklab(33.62% 0.0594 -0.1177)
OKLCHoklch(33.62% 0.132 296.8)
XYZxyz(5.6107, 3.3152, 15.9639)
Luminance0.0331 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402071 #517120
analogous
#202871 #402071 #682071
triadic
#402071 #714020 #207140
tetradic
#402071 #712028 #517120 #207168
square
#402071 #712028 #517120 #207168
split-complementary
#402071 #716820 #287120
monochromatic
#0E0718 #251241 #402071 #5B2EA1 #7742C9

Accessibility & contrast

On white

12.63
#402071 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#402071 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402071
12.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402071#FFFFFF#000000##FFFFFF
##4020711.0012.631.6612.63
#FFFFFF12.631.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003373
Deuteranopia (green-blind)
#00326F
Tritanopia (blue-blind)
#343446
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #402071;
/* rgb */ color: rgb(64, 32, 113);
/* oklch */ color: oklch(33.6% 0.132 296.8);
Tailwind
colors: {
  custom: {
    50: '#7a5e9a',
    500: '#402071',
    950: '#000000',
  },
}
SCSS
$custom: #402071;
$custom-light: #7a5e9a;
$custom-dark: #000000;
JSON
{
  "hex": "#402071",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 113
  },
  "hsl": {
    "h": 263.704,
    "s": 55.862,
    "l": 28.431
  },
  "oklch": {
    "l": 0.33622,
    "c": 0.13184,
    "h": 296.8
  },
  "luminance": 0.03315
}

Semantic roles & 50–950 ramp

primary
#402071
secondary
#80A548
accent
#DF49A4
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040E
muted
#7C797E

Preview Lab

Preview with #402071

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

Preview Lab → · Contrast checker → · Palette generator →

#402071 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva