#402197#402197

#402197 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.3% C 0.177 H 286.2°. Best body text is #FFFFFF at 11.16:1 contrast (WCAG AA passes).

Color values

HEX#402197
RGBrgb(64, 33, 151)
HSLhsl(256, 64%, 36%)
HSVhsv(256, 78%, 59%)
CMYKcmyk(57.6%, 78.1%, 0%, 40.8%)
CIE-LABlab(24.99, 44.64, -59.02)
CIE-LCHlch(24.99, 74.00, 307.10°)
OKLaboklab(37.34% 0.0493 -0.1699)
OKLCHoklch(37.34% 0.177 286.2)
XYZxyz(8.2424, 4.4116, 29.6894)
Luminance0.0441 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402197 #789721
analogous
#213D97 #402197 #7B2197
triadic
#402197 #974021 #219740
tetradic
#402197 #97213D #789721 #21977B
square
#402197 #97213D #789721 #21977B
split-complementary
#402197 #977B21 #3D9721
monochromatic
#150B33 #2B1665 #402197 #552CC9 #7A58DA

Accessibility & contrast

On white

11.16
#402197 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402197
11.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402197#FFFFFF#000000##FFFFFF
##4021971.0011.161.8811.16
#FFFFFF11.161.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E9A
Deuteranopia (green-blind)
#003895
Tritanopia (blue-blind)
#16435B
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402197;
/* rgb */ color: rgb(64, 33, 151);
/* oklch */ color: oklch(37.3% 0.177 286.2);
Tailwind
colors: {
  custom: {
    50: '#7f60b7',
    500: '#402197',
    950: '#000000',
  },
}
SCSS
$custom: #402197;
$custom-light: #7f60b7;
$custom-dark: #000000;
JSON
{
  "hex": "#402197",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 151
  },
  "hsl": {
    "h": 255.763,
    "s": 64.13,
    "l": 36.078
  },
  "oklch": {
    "l": 0.37338,
    "c": 0.17696,
    "h": 286.2
  },
  "luminance": 0.04412
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #402197

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

Preview Lab → · Contrast checker → · Palette generator →

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