#402090#402090

#402090 is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.5% C 0.170 H 287.9°. Best body text is #FFFFFF at 11.49:1 contrast (WCAG AA passes).

Color values

HEX#402090
RGBrgb(64, 32, 144)
HSLhsl(257, 64%, 35%)
HSVhsv(257, 78%, 56%)
CMYKcmyk(55.6%, 77.8%, 0%, 43.5%)
CIE-LABlab(24.12, 43.09, -56.13)
CIE-LCHlch(24.12, 70.76, 307.51°)
OKLaboklab(36.52% 0.0521 -0.1615)
OKLCHoklch(36.52% 0.17 287.9)
XYZxyz(7.6634, 4.1362, 26.7747)
Luminance0.0414 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402090 #709020
analogous
#203890 #402090 #782090
triadic
#402090 #904020 #209040
tetradic
#402090 #902038 #709020 #209078
square
#402090 #902038 #709020 #209078
split-complementary
#402090 #907820 #389020
monochromatic
#130A2C #2A155E #402090 #562BC2 #7852D9

Accessibility & contrast

On white

11.49
#402090 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#402090 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402090
11.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402090#FFFFFF#000000##FFFFFF
##4020901.0011.491.8311.49
#FFFFFF11.491.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C93
Deuteranopia (green-blind)
#00368E
Tritanopia (blue-blind)
#1F4057
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #402090;
/* rgb */ color: rgb(64, 32, 144);
/* oklch */ color: oklch(36.5% 0.170 287.9);
Tailwind
colors: {
  custom: {
    50: '#7e5fb2',
    500: '#402090',
    950: '#000000',
  },
}
SCSS
$custom: #402090;
$custom-light: #7e5fb2;
$custom-dark: #000000;
JSON
{
  "hex": "#402090",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 144
  },
  "hsl": {
    "h": 257.143,
    "s": 63.636,
    "l": 34.51
  },
  "oklch": {
    "l": 0.36517,
    "c": 0.16968,
    "h": 287.9
  },
  "luminance": 0.04137
}

Semantic roles & 50–950 ramp

primary
#402090
secondary
#9DBC50
accent
#E741B7
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #402090

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

Preview Lab → · Contrast checker → · Palette generator →

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