#402D85#402D85

#402D85 is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.4% C 0.140 H 287.5°. Best body text is #FFFFFF at 10.87:1 contrast (WCAG AA passes).

Color values

HEX#402D85
RGBrgb(64, 45, 133)
HSLhsl(253, 49%, 35%)
HSVhsv(253, 66%, 52%)
CMYKcmyk(51.9%, 66.2%, 0%, 47.8%)
CIE-LABlab(25.74, 32.46, -46.62)
CIE-LCHlch(25.74, 56.81, 304.85°)
OKLaboklab(37.37% 0.0422 -0.1336)
OKLCHoklch(37.37% 0.14 287.5)
XYZxyz(7.2851, 4.6599, 22.7013)
Luminance0.0466 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D85 #72852D
analogous
#2D4685 #402D85 #6C2D85
triadic
#402D85 #85402D #2D8540
tetradic
#402D85 #852D46 #72852D #2D856C
square
#402D85 #852D46 #72852D #2D856C
split-complementary
#402D85 #856C2D #46852D
monochromatic
#140E2A #2A1E57 #402D85 #563CB3 #7962CA

Accessibility & contrast

On white

10.87
#402D85 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#402D85 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D85
10.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D85#FFFFFF#000000##FFFFFF
##402D851.0010.871.9310.87
#FFFFFF10.871.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F88
Deuteranopia (green-blind)
#003B83
Tritanopia (blue-blind)
#274254
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402d85;
/* rgb */ color: rgb(64, 45, 133);
/* oklch */ color: oklch(37.4% 0.140 287.5);
Tailwind
colors: {
  custom: {
    50: '#7b67a9',
    500: '#402d85',
    950: '#000000',
  },
}
SCSS
$custom: #402d85;
$custom-light: #7b67a9;
$custom-dark: #000000;
JSON
{
  "hex": "#402d85",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 133
  },
  "hsl": {
    "h": 252.955,
    "s": 49.438,
    "l": 34.902
  },
  "oklch": {
    "l": 0.3737,
    "c": 0.14014,
    "h": 287.5
  },
  "luminance": 0.0466
}

Semantic roles & 50–950 ramp

primary
#402D85
secondary
#9FB05D
accent
#D94FBB
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402D85

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

Preview Lab → · Contrast checker → · Palette generator →

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