#402D83#402D83

#402D83 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.2% C 0.137 H 288.0°. Best body text is #FFFFFF at 10.93:1 contrast (WCAG AA passes).

Color values

HEX#402D83
RGBrgb(64, 45, 131)
HSLhsl(253, 49%, 35%)
HSVhsv(253, 66%, 51%)
CMYKcmyk(51.1%, 65.6%, 0%, 48.6%)
CIE-LABlab(25.58, 31.83, -45.64)
CIE-LCHlch(25.58, 55.64, 304.90°)
OKLaboklab(37.2% 0.0424 -0.1307)
OKLCHoklch(37.2% 0.137 288)
XYZxyz(7.1483, 4.6051, 21.9806)
Luminance0.0461 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D83 #70832D
analogous
#2D4583 #402D83 #6B2D83
triadic
#402D83 #83402D #2D8340
tetradic
#402D83 #832D45 #70832D #2D836B
square
#402D83 #832D45 #70832D #2D836B
split-complementary
#402D83 #836B2D #45832D
monochromatic
#130E28 #2A1D55 #402D83 #563DB1 #7862C9

Accessibility & contrast

On white

10.93
#402D83 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#402D83 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D83
10.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D83#FFFFFF#000000##FFFFFF
##402D831.0010.931.9210.93
#FFFFFF10.931.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F86
Deuteranopia (green-blind)
#003A81
Tritanopia (blue-blind)
#294253
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402d83;
/* rgb */ color: rgb(64, 45, 131);
/* oklch */ color: oklch(37.2% 0.137 288.0);
Tailwind
colors: {
  custom: {
    50: '#7b67a8',
    500: '#402d83',
    950: '#000000',
  },
}
SCSS
$custom: #402d83;
$custom-light: #7b67a8;
$custom-dark: #000000;
JSON
{
  "hex": "#402d83",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 131
  },
  "hsl": {
    "h": 253.256,
    "s": 48.864,
    "l": 34.51
  },
  "oklch": {
    "l": 0.372,
    "c": 0.13744,
    "h": 288
  },
  "luminance": 0.04605
}

Semantic roles & 50–950 ramp

primary
#402D83
secondary
#9DAF5C
accent
#D84FBA
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402D83

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

Preview Lab → · Contrast checker → · Palette generator →

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