#402687#402687

#402687 is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.5% C 0.152 H 288.8°. Best body text is #FFFFFF at 11.38:1 contrast (WCAG AA passes).

Color values

HEX#402687
RGBrgb(64, 38, 135)
HSLhsl(256, 56%, 34%)
HSVhsv(256, 72%, 53%)
CMYKcmyk(52.6%, 71.9%, 0%, 47.1%)
CIE-LABlab(24.40, 37.21, -50.06)
CIE-LCHlch(24.40, 62.38, 306.62°)
OKLaboklab(36.46% 0.0491 -0.1437)
OKLCHoklch(36.46% 0.152 288.8)
XYZxyz(7.1794, 4.2252, 23.3542)
Luminance0.0423 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402687 #6D8726
analogous
#263D87 #402687 #712687
triadic
#402687 #874026 #268740
tetradic
#402687 #87263D #6D8726 #268771
square
#402687 #87263D #6D8726 #268771
split-complementary
#402687 #877126 #3D8726
monochromatic
#130B27 #291957 #402687 #5733B7 #7858D0

Accessibility & contrast

On white

11.38
#402687 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#402687 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402687
11.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402687#FFFFFF#000000##FFFFFF
##4026871.0011.381.8511.38
#FFFFFF11.381.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8A
Deuteranopia (green-blind)
#003885
Tritanopia (blue-blind)
#263F53
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #402687;
/* rgb */ color: rgb(64, 38, 135);
/* oklch */ color: oklch(36.5% 0.152 288.8);
Tailwind
colors: {
  custom: {
    50: '#7c63ab',
    500: '#402687',
    950: '#000000',
  },
}
SCSS
$custom: #402687;
$custom-light: #7c63ab;
$custom-dark: #000000;
JSON
{
  "hex": "#402687",
  "rgb": {
    "r": 64,
    "g": 38,
    "b": 135
  },
  "hsl": {
    "h": 256.082,
    "s": 56.069,
    "l": 33.922
  },
  "oklch": {
    "l": 0.36459,
    "c": 0.15187,
    "h": 288.8
  },
  "luminance": 0.04225
}

Semantic roles & 50–950 ramp

primary
#402687
secondary
#9BB554
accent
#DF48B7
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402687

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

Preview Lab → · Contrast checker → · Palette generator →

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