#402195#402195

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

Color values

HEX#402195
RGBrgb(64, 33, 149)
HSLhsl(256, 64%, 36%)
HSVhsv(256, 78%, 58%)
CMYKcmyk(57%, 77.9%, 0%, 41.6%)
CIE-LABlab(24.79, 44.05, -58.12)
CIE-LCHlch(24.79, 72.93, 307.16°)
OKLaboklab(37.14% 0.0499 -0.1673)
OKLCHoklch(37.14% 0.175 286.6)
XYZxyz(8.0814, 4.3472, 28.8412)
Luminance0.0435 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402195 #769521
analogous
#213C95 #402195 #7A2195
triadic
#402195 #954021 #219540
tetradic
#402195 #95213C #769521 #21957A
square
#402195 #95213C #769521 #21957A
split-complementary
#402195 #957A21 #3C9521
monochromatic
#150B31 #2A1663 #402195 #562CC7 #7A57DA

Accessibility & contrast

On white

11.23
#402195 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402195
11.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402195#FFFFFF#000000##FFFFFF
##4021951.0011.231.8711.23
#FFFFFF11.231.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E98
Deuteranopia (green-blind)
#003793
Tritanopia (blue-blind)
#19425A
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402195;
/* rgb */ color: rgb(64, 33, 149);
/* oklch */ color: oklch(37.1% 0.175 286.6);
Tailwind
colors: {
  custom: {
    50: '#7f60b5',
    500: '#402195',
    950: '#000000',
  },
}
SCSS
$custom: #402195;
$custom-light: #7f60b5;
$custom-dark: #000000;
JSON
{
  "hex": "#402195",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 149
  },
  "hsl": {
    "h": 256.034,
    "s": 63.736,
    "l": 35.686
  },
  "oklch": {
    "l": 0.37137,
    "c": 0.17459,
    "h": 286.6
  },
  "luminance": 0.04348
}

Semantic roles & 50–950 ramp

primary
#402195
secondary
#A1BE54
accent
#E741BA
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402195

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

Preview Lab → · Contrast checker → · Palette generator →

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