#402196#402196

#402196 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.2% C 0.176 H 286.4°. Best body text is #FFFFFF at 11.19:1 contrast (WCAG AA passes).

Color values

HEX#402196
RGBrgb(64, 33, 150)
HSLhsl(256, 64%, 36%)
HSVhsv(256, 78%, 59%)
CMYKcmyk(57.3%, 78%, 0%, 41.2%)
CIE-LABlab(24.89, 44.35, -58.57)
CIE-LCHlch(24.89, 73.47, 307.13°)
OKLaboklab(37.24% 0.0496 -0.1686)
OKLCHoklch(37.24% 0.176 286.4)
XYZxyz(8.1616, 4.3792, 29.2635)
Luminance0.0438 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402196 #779621
analogous
#213D96 #402196 #7A2196
triadic
#402196 #964021 #219640
tetradic
#402196 #96213D #779621 #21967A
square
#402196 #96213D #779621 #21967A
split-complementary
#402196 #967A21 #3D9621
monochromatic
#150B32 #2B1664 #402196 #552CC8 #7A57DA

Accessibility & contrast

On white

11.19
#402196 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.88
#402196 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402196
11.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402196#FFFFFF#000000##FFFFFF
##4021961.0011.191.8811.19
#FFFFFF11.191.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.191.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #402196;
/* rgb */ color: rgb(64, 33, 150);
/* oklch */ color: oklch(37.2% 0.176 286.4);
Tailwind
colors: {
  custom: {
    50: '#7f60b6',
    500: '#402196',
    950: '#000000',
  },
}
SCSS
$custom: #402196;
$custom-light: #7f60b6;
$custom-dark: #000000;
JSON
{
  "hex": "#402196",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 150
  },
  "hsl": {
    "h": 255.897,
    "s": 63.934,
    "l": 35.882
  },
  "oklch": {
    "l": 0.37238,
    "c": 0.17577,
    "h": 286.4
  },
  "luminance": 0.0438
}

Semantic roles & 50–950 ramp

primary
#402196
secondary
#A2BE55
accent
#E741BB
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402196

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

Preview Lab → · Contrast checker → · Palette generator →

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