#402099#402099

#402099 is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.4% C 0.180 H 285.9°. Best body text is #FFFFFF at 11.14:1 contrast (WCAG AA passes).

Color values

HEX#402099
RGBrgb(64, 32, 153)
HSLhsl(256, 65%, 36%)
HSVhsv(256, 79%, 60%)
CMYKcmyk(58.2%, 79.1%, 0%, 40%)
CIE-LABlab(25.02, 45.71, -60.20)
CIE-LCHlch(25.02, 75.59, 307.21°)
OKLaboklab(37.42% 0.0494 -0.1734)
OKLCHoklch(37.42% 0.18 285.9)
XYZxyz(8.3789, 4.4224, 30.5429)
Luminance0.0442 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402099 #799920
analogous
#203D99 #402099 #7D2099
triadic
#402099 #994020 #209940
tetradic
#402099 #99203D #799920 #20997D
square
#402099 #99203D #799920 #20997D
split-complementary
#402099 #997D20 #3D9920
monochromatic
#160B34 #2B1566 #402099 #552BCC #7A57DC

Accessibility & contrast

On white

11.14
#402099 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402099
11.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402099#FFFFFF#000000##FFFFFF
##4020991.0011.141.8811.14
#FFFFFF11.141.0021.001.00
#0000001.8821.001.0021.00
##FFFFFF11.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E9C
Deuteranopia (green-blind)
#003897
Tritanopia (blue-blind)
#13435C
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402099;
/* rgb */ color: rgb(64, 32, 153);
/* oklch */ color: oklch(37.4% 0.180 285.9);
Tailwind
colors: {
  custom: {
    50: '#8060b8',
    500: '#402099',
    950: '#000000',
  },
}
SCSS
$custom: #402099;
$custom-light: #8060b8;
$custom-dark: #000000;
JSON
{
  "hex": "#402099",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 153
  },
  "hsl": {
    "h": 255.868,
    "s": 65.405,
    "l": 36.275
  },
  "oklch": {
    "l": 0.37423,
    "c": 0.18027,
    "h": 285.9
  },
  "luminance": 0.04423
}

Semantic roles & 50–950 ramp

primary
#402099
secondary
#A4C055
accent
#E83FBC
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #402099

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

Preview Lab → · Contrast checker → · Palette generator →

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