#402091#402091

#402091 is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.6% C 0.171 H 287.6°. Best body text is #FFFFFF at 11.45:1 contrast (WCAG AA passes).

Color values

HEX#402091
RGBrgb(64, 32, 145)
HSLhsl(257, 64%, 35%)
HSVhsv(257, 78%, 57%)
CMYKcmyk(55.9%, 77.9%, 0%, 43.1%)
CIE-LABlab(24.22, 43.38, -56.59)
CIE-LCHlch(24.22, 71.30, 307.47°)
OKLaboklab(36.62% 0.0518 -0.1628)
OKLCHoklch(36.62% 0.171 287.6)
XYZxyz(7.7402, 4.1669, 27.1790)
Luminance0.0417 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402091 #719120
analogous
#203991 #402091 #792091
triadic
#402091 #914020 #209140
tetradic
#402091 #912039 #719120 #209179
square
#402091 #912039 #719120 #209179
split-complementary
#402091 #917920 #399120
monochromatic
#140A2D #2A155F #402091 #562BC3 #7952D9

Accessibility & contrast

On white

11.45
#402091 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#402091 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402091
11.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402091#FFFFFF#000000##FFFFFF
##4020911.0011.451.8311.45
#FFFFFF11.451.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C94
Deuteranopia (green-blind)
#00368F
Tritanopia (blue-blind)
#1E4057
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #402091;
/* rgb */ color: rgb(64, 32, 145);
/* oklch */ color: oklch(36.6% 0.171 287.6);
Tailwind
colors: {
  custom: {
    50: '#7e60b2',
    500: '#402091',
    950: '#000000',
  },
}
SCSS
$custom: #402091;
$custom-light: #7e60b2;
$custom-dark: #000000;
JSON
{
  "hex": "#402091",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 145
  },
  "hsl": {
    "h": 256.991,
    "s": 63.842,
    "l": 34.706
  },
  "oklch": {
    "l": 0.36617,
    "c": 0.17086,
    "h": 287.6
  },
  "luminance": 0.04167
}

Semantic roles & 50–950 ramp

primary
#402091
secondary
#9EBC51
accent
#E741B8
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402091

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

Preview Lab → · Contrast checker → · Palette generator →

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