#402087#402087

#402087 is a dark, vivid violet. Relative luminance 0.039; OKLCH L 35.6% C 0.159 H 290.1°. Best body text is #FFFFFF at 11.83:1 contrast (WCAG AA passes).

Color values

HEX#402087
RGBrgb(64, 32, 135)
HSLhsl(259, 62%, 33%)
HSVhsv(259, 76%, 53%)
CMYKcmyk(52.6%, 76.3%, 0%, 47.1%)
CIE-LABlab(23.24, 40.46, -51.96)
CIE-LCHlch(23.24, 65.85, 307.91°)
OKLaboklab(35.64% 0.0545 -0.1493)
OKLCHoklch(35.64% 0.159 290.1)
XYZxyz(7.0028, 3.8720, 23.2954)
Luminance0.0387 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402087 #678720
analogous
#203387 #402087 #742087
triadic
#402087 #874020 #208740
tetradic
#402087 #872033 #678720 #208774
square
#402087 #872033 #678720 #208774
split-complementary
#402087 #877420 #338720
monochromatic
#110924 #291456 #402087 #572CB8 #774DD5

Accessibility & contrast

On white

11.83
#402087 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#402087 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402087
11.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402087#FFFFFF#000000##FFFFFF
##4020871.0011.831.7711.83
#FFFFFF11.831.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398A
Deuteranopia (green-blind)
#003585
Tritanopia (blue-blind)
#273C52
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402087;
/* rgb */ color: rgb(64, 32, 135);
/* oklch */ color: oklch(35.6% 0.159 290.1);
Tailwind
colors: {
  custom: {
    50: '#7d5fab',
    500: '#402087',
    950: '#000000',
  },
}
SCSS
$custom: #402087;
$custom-light: #7d5fab;
$custom-dark: #000000;
JSON
{
  "hex": "#402087",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 135
  },
  "hsl": {
    "h": 258.641,
    "s": 61.677,
    "l": 32.745
  },
  "oklch": {
    "l": 0.35638,
    "c": 0.15891,
    "h": 290.1
  },
  "luminance": 0.03872
}

Semantic roles & 50–950 ramp

primary
#402087
secondary
#96B84B
accent
#E543B3
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402087

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

Preview Lab → · Contrast checker → · Palette generator →

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