#402C85#402C85

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

Color values

HEX#402C85
RGBrgb(64, 44, 133)
HSLhsl(253, 50%, 35%)
HSVhsv(253, 67%, 52%)
CMYKcmyk(51.9%, 66.9%, 0%, 47.8%)
CIE-LABlab(25.52, 33.07, -46.99)
CIE-LCHlch(25.52, 57.46, 305.14°)
OKLaboklab(37.21% 0.0433 -0.1347)
OKLCHoklch(37.21% 0.142 287.8)
XYZxyz(7.2474, 4.5845, 22.6888)
Luminance0.0459 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C85 #71852C
analogous
#2C4585 #402C85 #6C2C85
triadic
#402C85 #85402C #2C8540
tetradic
#402C85 #852C45 #71852C #2C856C
square
#402C85 #852C45 #71852C #2C856C
split-complementary
#402C85 #856C2C #45852C
monochromatic
#140E29 #2A1D57 #402C85 #563BB3 #7961CB

Accessibility & contrast

On white

10.95
#402C85 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402C85
10.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C85#FFFFFF#000000##FFFFFF
##402C851.0010.951.9210.95
#FFFFFF10.951.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.951.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402c85;
/* rgb */ color: rgb(64, 44, 133);
/* oklch */ color: oklch(37.2% 0.142 287.8);
Tailwind
colors: {
  custom: {
    50: '#7c66a9',
    500: '#402c85',
    950: '#000000',
  },
}
SCSS
$custom: #402c85;
$custom-light: #7c66a9;
$custom-dark: #000000;
JSON
{
  "hex": "#402c85",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 133
  },
  "hsl": {
    "h": 253.483,
    "s": 50.282,
    "l": 34.706
  },
  "oklch": {
    "l": 0.37206,
    "c": 0.14151,
    "h": 287.8
  },
  "luminance": 0.04585
}

Semantic roles & 50–950 ramp

primary
#402C85
secondary
#9EB15C
accent
#DA4EBA
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A0610
muted
#7C7A7F

Preview Lab

Preview with #402C85

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

Preview Lab → · Contrast checker → · Palette generator →

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