#402386#402386

#402386 is a dark, vivid violet. Relative luminance 0.040; OKLCH L 35.9% C 0.154 H 289.7°. Best body text is #FFFFFF at 11.65:1 contrast (WCAG AA passes).

Color values

HEX#402386
RGBrgb(64, 35, 134)
HSLhsl(258, 59%, 33%)
HSVhsv(258, 74%, 53%)
CMYKcmyk(52.2%, 73.9%, 0%, 47.5%)
CIE-LABlab(23.71, 38.57, -50.56)
CIE-LCHlch(23.71, 63.59, 307.34°)
OKLaboklab(35.94% 0.0521 -0.1452)
OKLCHoklch(35.94% 0.154 289.7)
XYZxyz(7.0172, 4.0130, 22.9545)
Luminance0.0401 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402386 #698623
analogous
#233786 #402386 #712386
triadic
#402386 #864023 #238640
tetradic
#402386 #862337 #698623 #238671
square
#402386 #862337 #698623 #238671
split-complementary
#402386 #867123 #378623
monochromatic
#120A25 #291655 #402386 #5730B7 #7752D2

Accessibility & contrast

On white

11.65
#402386 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#402386 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402386
11.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402386#FFFFFF#000000##FFFFFF
##4023861.0011.651.8011.65
#FFFFFF11.651.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A89
Deuteranopia (green-blind)
#003684
Tritanopia (blue-blind)
#273D52
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #402386;
/* rgb */ color: rgb(64, 35, 134);
/* oklch */ color: oklch(35.9% 0.154 289.7);
Tailwind
colors: {
  custom: {
    50: '#7c61aa',
    500: '#402386',
    950: '#000000',
  },
}
SCSS
$custom: #402386;
$custom-light: #7c61aa;
$custom-dark: #000000;
JSON
{
  "hex": "#402386",
  "rgb": {
    "r": 64,
    "g": 35,
    "b": 134
  },
  "hsl": {
    "h": 257.576,
    "s": 58.58,
    "l": 33.137
  },
  "oklch": {
    "l": 0.35942,
    "c": 0.15425,
    "h": 289.7
  },
  "luminance": 0.04013
}

Semantic roles & 50–950 ramp

primary
#402386
secondary
#98B54F
accent
#E246B4
background
#F8F5FA
surface
#EFEAF4
border
#CAC6CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402386

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

Preview Lab → · Contrast checker → · Palette generator →

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