#402D95#402D95

#402D95 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 38.8% C 0.161 H 284.4°. Best body text is #FFFFFF at 10.36:1 contrast (WCAG AA passes).

Color values

HEX#402D95
RGBrgb(64, 45, 149)
HSLhsl(251, 54%, 38%)
HSVhsv(251, 70%, 58%)
CMYKcmyk(57%, 69.8%, 0%, 41.6%)
CIE-LABlab(27.12, 37.52, -54.30)
CIE-LCHlch(27.12, 66.00, 304.65°)
OKLaboklab(38.79% 0.04 -0.1562)
OKLCHoklch(38.79% 0.161 284.4)
XYZxyz(8.4759, 5.1362, 28.9727)
Luminance0.0514 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D95 #82952D
analogous
#2D4E95 #402D95 #742D95
triadic
#402D95 #95402D #2D9540
tetradic
#402D95 #952D4E #82952D #2D9574
square
#402D95 #952D4E #82952D #2D9574
split-complementary
#402D95 #95742D #4E952D
monochromatic
#181137 #2C1F66 #402D95 #543BC4 #7D6AD2

Accessibility & contrast

On white

10.36
#402D95 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#402D95 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D95
10.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D95#FFFFFF#000000##FFFFFF
##402D951.0010.362.0310.36
#FFFFFF10.361.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004398
Deuteranopia (green-blind)
#003D93
Tritanopia (blue-blind)
#17485D
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #402d95;
/* rgb */ color: rgb(64, 45, 149);
/* oklch */ color: oklch(38.8% 0.161 284.4);
Tailwind
colors: {
  custom: {
    50: '#7e67b5',
    500: '#402d95',
    950: '#000000',
  },
}
SCSS
$custom: #402d95;
$custom-light: #7e67b5;
$custom-dark: #000000;
JSON
{
  "hex": "#402d95",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 149
  },
  "hsl": {
    "h": 250.962,
    "s": 53.608,
    "l": 38.039
  },
  "oklch": {
    "l": 0.3879,
    "c": 0.1612,
    "h": 284.4
  },
  "luminance": 0.05137
}

Semantic roles & 50–950 ramp

primary
#402D95
secondary
#AAB965
accent
#DD4BC2
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0611
muted
#7C7A80

Preview Lab

Preview with #402D95

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

Preview Lab → · Contrast checker → · Palette generator →

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