#402391#402391

#402391 is a dark, vivid violet. Relative luminance 0.043; OKLCH L 37.0% C 0.168 H 287.1°. Best body text is #FFFFFF at 11.25:1 contrast (WCAG AA passes).

Color values

HEX#402391
RGBrgb(64, 35, 145)
HSLhsl(256, 61%, 35%)
HSVhsv(256, 76%, 57%)
CMYKcmyk(55.9%, 75.9%, 0%, 43.1%)
CIE-LABlab(24.75, 41.85, -55.71)
CIE-LCHlch(24.75, 69.68, 306.92°)
OKLaboklab(36.99% 0.0494 -0.1603)
OKLCHoklch(36.99% 0.168 287.1)
XYZxyz(7.8247, 4.3360, 27.2072)
Luminance0.0434 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402391 #749123
analogous
#233D91 #402391 #772391
triadic
#402391 #914023 #239140
tetradic
#402391 #91233D #749123 #239177
square
#402391 #91233D #749123 #239177
split-complementary
#402391 #917723 #3D9123
monochromatic
#140B2E #2A1760 #402391 #562FC2 #7958D7

Accessibility & contrast

On white

11.25
#402391 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#402391 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402391
11.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402391#FFFFFF#000000##FFFFFF
##4023911.0011.251.8711.25
#FFFFFF11.251.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.251.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402391;
/* rgb */ color: rgb(64, 35, 145);
/* oklch */ color: oklch(37.0% 0.168 287.1);
Tailwind
colors: {
  custom: {
    50: '#7e61b2',
    500: '#402391',
    950: '#000000',
  },
}
SCSS
$custom: #402391;
$custom-light: #7e61b2;
$custom-dark: #000000;
JSON
{
  "hex": "#402391",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 145
  },
  "hsl": {
    "h": 255.818,
    "s": 61.111,
    "l": 35.294
  },
  "oklch": {
    "l": 0.36994,
    "c": 0.16772,
    "h": 287.1
  },
  "luminance": 0.04336
}

Semantic roles & 50–950 ramp

primary
#402391
secondary
#A0BB55
accent
#E444BA
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402391

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

Preview Lab → · Contrast checker → · Palette generator →

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