#402591#402591

#402591 is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.3% C 0.166 H 286.8°. Best body text is #FFFFFF at 11.10:1 contrast (WCAG AA passes).

Color values

HEX#402591
RGBrgb(64, 37, 145)
HSLhsl(255, 59%, 36%)
HSVhsv(255, 74%, 57%)
CMYKcmyk(55.9%, 74.5%, 0%, 43.1%)
CIE-LABlab(25.13, 40.79, -55.09)
CIE-LCHlch(25.13, 68.55, 306.52°)
OKLaboklab(37.26% 0.0478 -0.1585)
OKLCHoklch(37.26% 0.166 286.8)
XYZxyz(7.8852, 4.4570, 27.2274)
Luminance0.0446 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402591 #769125
analogous
#254091 #402591 #762591
triadic
#402591 #914025 #259140
tetradic
#402591 #912540 #769125 #259176
square
#402591 #912540 #769125 #259176
split-complementary
#402591 #917625 #409125
monochromatic
#150C2F #2A1960 #402591 #5631C2 #7A5BD5

Accessibility & contrast

On white

11.10
#402591 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.89
#402591 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402591
11.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402591#FFFFFF#000000##FFFFFF
##4025911.0011.101.8911.10
#FFFFFF11.101.0021.001.00
#0000001.8921.001.0021.00
##FFFFFF11.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E94
Deuteranopia (green-blind)
#00388F
Tritanopia (blue-blind)
#1D4259
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #402591;
/* rgb */ color: rgb(64, 37, 145);
/* oklch */ color: oklch(37.3% 0.166 286.8);
Tailwind
colors: {
  custom: {
    50: '#7e62b2',
    500: '#402591',
    950: '#000000',
  },
}
SCSS
$custom: #402591;
$custom-light: #7e62b2;
$custom-dark: #000000;
JSON
{
  "hex": "#402591",
  "rgb": {
    "r": 64,
    "g": 37,
    "b": 145
  },
  "hsl": {
    "h": 255,
    "s": 59.341,
    "l": 35.686
  },
  "oklch": {
    "l": 0.37259,
    "c": 0.16553,
    "h": 286.8
  },
  "luminance": 0.04457
}

Semantic roles & 50–950 ramp

primary
#402591
secondary
#A1BA58
accent
#E345BB
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402591

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

Preview Lab → · Contrast checker → · Palette generator →

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