#402791#402791

#402791 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.5% C 0.163 H 286.4°. Best body text is #FFFFFF at 10.95:1 contrast (WCAG AA passes).

Color values

HEX#402791
RGBrgb(64, 39, 145)
HSLhsl(254, 58%, 36%)
HSVhsv(254, 73%, 57%)
CMYKcmyk(55.9%, 73.1%, 0%, 43.1%)
CIE-LABlab(25.52, 39.70, -54.45)
CIE-LCHlch(25.52, 67.39, 306.10°)
OKLaboklab(37.54% 0.0461 -0.1566)
OKLCHoklch(37.54% 0.163 286.4)
XYZxyz(7.9492, 4.5849, 27.2487)
Luminance0.0459 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402791 #789127
analogous
#274391 #402791 #752791
triadic
#402791 #914027 #279140
tetradic
#402791 #912743 #789127 #279175
square
#402791 #912743 #789127 #279175
split-complementary
#402791 #917527 #439127
monochromatic
#150D31 #2B1A61 #402791 #5534C1 #7A5FD4

Accessibility & contrast

On white

10.95
#402791 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#402791 on #000000
AA ✗AA large ✗AAA ✗

Best text color

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

Contrast matrix

fg \ bg##402791#FFFFFF#000000##FFFFFF
##4027911.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)
#003F94
Deuteranopia (green-blind)
#00398F
Tritanopia (blue-blind)
#1D4359
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #402791;
/* rgb */ color: rgb(64, 39, 145);
/* oklch */ color: oklch(37.5% 0.163 286.4);
Tailwind
colors: {
  custom: {
    50: '#7e64b2',
    500: '#402791',
    950: '#000000',
  },
}
SCSS
$custom: #402791;
$custom-light: #7e64b2;
$custom-dark: #000000;
JSON
{
  "hex": "#402791",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 145
  },
  "hsl": {
    "h": 254.151,
    "s": 57.609,
    "l": 36.078
  },
  "oklch": {
    "l": 0.37535,
    "c": 0.16326,
    "h": 286.4
  },
  "luminance": 0.04585
}

Semantic roles & 50–950 ramp

primary
#402791
secondary
#A3B95B
accent
#E147BD
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402791

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

Preview Lab → · Contrast checker → · Palette generator →

#402791 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva