#402E85#402E85

#402E85 is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.5% C 0.139 H 287.2°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#402E85
RGBrgb(64, 46, 133)
HSLhsl(252, 49%, 35%)
HSVhsv(252, 65%, 52%)
CMYKcmyk(51.9%, 65.4%, 0%, 47.8%)
CIE-LABlab(25.97, 31.85, -46.25)
CIE-LCHlch(25.97, 56.16, 304.55°)
OKLaboklab(37.54% 0.0411 -0.1325)
OKLCHoklch(37.54% 0.139 287.2)
XYZxyz(7.3237, 4.7371, 22.7142)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E85 #73852E
analogous
#2E4785 #402E85 #6C2E85
triadic
#402E85 #85402E #2E8540
tetradic
#402E85 #852E47 #73852E #2E856C
square
#402E85 #852E47 #73852E #2E856C
split-complementary
#402E85 #856C2E #47852E
monochromatic
#140F2A #2A1E58 #402E85 #563EB2 #7964C9

Accessibility & contrast

On white

10.78
#402E85 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#402E85 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E85
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E85#FFFFFF#000000##FFFFFF
##402E851.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402e85;
/* rgb */ color: rgb(64, 46, 133);
/* oklch */ color: oklch(37.5% 0.139 287.2);
Tailwind
colors: {
  custom: {
    50: '#7b68a9',
    500: '#402e85',
    950: '#000000',
  },
}
SCSS
$custom: #402e85;
$custom-light: #7b68a9;
$custom-dark: #000000;
JSON
{
  "hex": "#402e85",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 133
  },
  "hsl": {
    "h": 252.414,
    "s": 48.603,
    "l": 35.098
  },
  "oklch": {
    "l": 0.37537,
    "c": 0.13877,
    "h": 287.2
  },
  "luminance": 0.04737
}

Semantic roles & 50–950 ramp

primary
#402E85
secondary
#9FB05F
accent
#D850BC
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402E85

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

Preview Lab → · Contrast checker → · Palette generator →

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