#402387#402387

#402387 is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.0% C 0.155 H 289.5°. Best body text is #FFFFFF at 11.61:1 contrast (WCAG AA passes).

Color values

HEX#402387
RGBrgb(64, 35, 135)
HSLhsl(257, 59%, 33%)
HSVhsv(257, 74%, 53%)
CMYKcmyk(52.6%, 74.1%, 0%, 47.1%)
CIE-LABlab(23.81, 38.87, -51.04)
CIE-LCHlch(23.81, 64.15, 307.29°)
OKLaboklab(36.04% 0.0519 -0.1466)
OKLCHoklch(36.04% 0.155 289.5)
XYZxyz(7.0873, 4.0410, 23.3235)
Luminance0.0404 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402387 #6A8723
analogous
#233887 #402387 #722387
triadic
#402387 #874023 #238740
tetradic
#402387 #872338 #6A8723 #238772
square
#402387 #872338 #6A8723 #238772
split-complementary
#402387 #877223 #388723
monochromatic
#120A26 #291656 #402387 #5730B8 #7752D2

Accessibility & contrast

On white

11.61
#402387 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#402387 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402387
11.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402387#FFFFFF#000000##FFFFFF
##4023871.0011.611.8111.61
#FFFFFF11.611.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8A
Deuteranopia (green-blind)
#003685
Tritanopia (blue-blind)
#263D53
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #402387;
/* rgb */ color: rgb(64, 35, 135);
/* oklch */ color: oklch(36.0% 0.155 289.5);
Tailwind
colors: {
  custom: {
    50: '#7d61ab',
    500: '#402387',
    950: '#000000',
  },
}
SCSS
$custom: #402387;
$custom-light: #7d61ab;
$custom-dark: #000000;
JSON
{
  "hex": "#402387",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 135
  },
  "hsl": {
    "h": 257.4,
    "s": 58.824,
    "l": 33.333
  },
  "oklch": {
    "l": 0.36036,
    "c": 0.15549,
    "h": 289.5
  },
  "luminance": 0.04041
}

Semantic roles & 50–950 ramp

primary
#402387
secondary
#98B650
accent
#E246B5
background
#F8F5FA
surface
#EFEAF4
border
#CAC6CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402387

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

Preview Lab → · Contrast checker → · Palette generator →

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