#402096#402096

#402096 is a dark, vivid violet. Relative luminance 0.043; OKLCH L 37.1% C 0.177 H 286.5°. Best body text is #FFFFFF at 11.26:1 contrast (WCAG AA passes).

Color values

HEX#402096
RGBrgb(64, 32, 150)
HSLhsl(256, 65%, 36%)
HSVhsv(256, 79%, 59%)
CMYKcmyk(57.3%, 78.7%, 0%, 41.2%)
CIE-LABlab(24.72, 44.84, -58.85)
CIE-LCHlch(24.72, 73.99, 307.30°)
OKLaboklab(37.12% 0.0503 -0.1694)
OKLCHoklch(37.12% 0.177 286.5)
XYZxyz(8.1342, 4.3246, 29.2544)
Luminance0.0432 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402096 #769620
analogous
#203B96 #402096 #7B2096
triadic
#402096 #964020 #209640
tetradic
#402096 #96203B #769620 #20967B
square
#402096 #96203B #769620 #20967B
split-complementary
#402096 #967B20 #3B9620
monochromatic
#150A31 #2A1564 #402096 #562BC8 #7A56DB

Accessibility & contrast

On white

11.26
#402096 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402096
11.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402096#FFFFFF#000000##FFFFFF
##4020961.0011.261.8711.26
#FFFFFF11.261.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E99
Deuteranopia (green-blind)
#003794
Tritanopia (blue-blind)
#17425A
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402096;
/* rgb */ color: rgb(64, 32, 150);
/* oklch */ color: oklch(37.1% 0.177 286.5);
Tailwind
colors: {
  custom: {
    50: '#7f60b6',
    500: '#402096',
    950: '#000000',
  },
}
SCSS
$custom: #402096;
$custom-light: #7f60b6;
$custom-dark: #000000;
JSON
{
  "hex": "#402096",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 150
  },
  "hsl": {
    "h": 256.271,
    "s": 64.835,
    "l": 35.686
  },
  "oklch": {
    "l": 0.37118,
    "c": 0.17676,
    "h": 286.5
  },
  "luminance": 0.04325
}

Semantic roles & 50–950 ramp

primary
#402096
secondary
#A1BE53
accent
#E840BA
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402096

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

Preview Lab → · Contrast checker → · Palette generator →

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