#402199#402199

#402199 is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.5% C 0.179 H 285.8°. Best body text is #FFFFFF at 11.08:1 contrast (WCAG AA passes).

Color values

HEX#402199
RGBrgb(64, 33, 153)
HSLhsl(256, 65%, 36%)
HSVhsv(256, 78%, 60%)
CMYKcmyk(58.2%, 78.4%, 0%, 40%)
CIE-LABlab(25.19, 45.23, -59.92)
CIE-LCHlch(25.19, 75.07, 307.05°)
OKLaboklab(37.54% 0.0487 -0.1726)
OKLCHoklch(37.54% 0.179 285.8)
XYZxyz(8.4062, 4.4771, 30.5520)
Luminance0.0448 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402199 #7A9921
analogous
#213E99 #402199 #7C2199
triadic
#402199 #994021 #219940
tetradic
#402199 #99213E #7A9921 #21997C
square
#402199 #99213E #7A9921 #21997C
split-complementary
#402199 #997C21 #3E9921
monochromatic
#160B34 #2B1667 #402199 #552CCB #7B59DB

Accessibility & contrast

On white

11.08
#402199 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#402199 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402199
11.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402199#FFFFFF#000000##FFFFFF
##4021991.0011.081.9011.08
#FFFFFF11.081.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F9C
Deuteranopia (green-blind)
#003897
Tritanopia (blue-blind)
#12445C
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #402199;
/* rgb */ color: rgb(64, 33, 153);
/* oklch */ color: oklch(37.5% 0.179 285.8);
Tailwind
colors: {
  custom: {
    50: '#8061b8',
    500: '#402199',
    950: '#000000',
  },
}
SCSS
$custom: #402199;
$custom-light: #8061b8;
$custom-dark: #000000;
JSON
{
  "hex": "#402199",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 153
  },
  "hsl": {
    "h": 255.5,
    "s": 64.516,
    "l": 36.471
  },
  "oklch": {
    "l": 0.3754,
    "c": 0.17932,
    "h": 285.8
  },
  "luminance": 0.04478
}

Semantic roles & 50–950 ramp

primary
#402199
secondary
#A4BF56
accent
#E840BC
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402199

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

Preview Lab → · Contrast checker → · Palette generator →

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