#402491#402491

#402491 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.1% C 0.167 H 287.0°. Best body text is #FFFFFF at 11.17:1 contrast (WCAG AA passes).

Color values

HEX#402491
RGBrgb(64, 36, 145)
HSLhsl(255, 60%, 35%)
HSVhsv(255, 75%, 57%)
CMYKcmyk(55.9%, 75.2%, 0%, 43.1%)
CIE-LABlab(24.94, 41.33, -55.40)
CIE-LCHlch(24.94, 69.12, 306.72°)
OKLaboklab(37.13% 0.0486 -0.1594)
OKLCHoklch(37.13% 0.167 287)
XYZxyz(7.8545, 4.3957, 27.2171)
Luminance0.0440 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402491 #759124
analogous
#243E91 #402491 #762491
triadic
#402491 #914024 #249140
tetradic
#402491 #91243E #759124 #249176
square
#402491 #91243E #759124 #249176
split-complementary
#402491 #917624 #3E9124
monochromatic
#150C2F #2A1860 #402491 #5630C2 #7959D6

Accessibility & contrast

On white

11.17
#402491 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.88
#402491 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402491
11.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402491#FFFFFF#000000##FFFFFF
##4024911.0011.171.8811.17
#FFFFFF11.171.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.171.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402491;
/* rgb */ color: rgb(64, 36, 145);
/* oklch */ color: oklch(37.1% 0.167 287.0);
Tailwind
colors: {
  custom: {
    50: '#7e62b2',
    500: '#402491',
    950: '#000000',
  },
}
SCSS
$custom: #402491;
$custom-light: #7e62b2;
$custom-dark: #000000;
JSON
{
  "hex": "#402491",
  "rgb": {
    "r": 64,
    "g": 36,
    "b": 145
  },
  "hsl": {
    "h": 255.413,
    "s": 60.221,
    "l": 35.49
  },
  "oklch": {
    "l": 0.37125,
    "c": 0.16663,
    "h": 287
  },
  "luminance": 0.04396
}

Semantic roles & 50–950 ramp

primary
#402491
secondary
#A1BA56
accent
#E344BB
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402491

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

Preview Lab → · Contrast checker → · Palette generator →

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