#402790#402790

#402790 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.4% C 0.162 H 286.6°. Best body text is #FFFFFF at 10.99:1 contrast (WCAG AA passes).

Color values

HEX#402790
RGBrgb(64, 39, 144)
HSLhsl(254, 57%, 36%)
HSVhsv(254, 73%, 56%)
CMYKcmyk(55.6%, 72.9%, 0%, 43.5%)
CIE-LABlab(25.43, 39.40, -53.99)
CIE-LCHlch(25.43, 66.83, 306.12°)
OKLaboklab(37.44% 0.0463 -0.1552)
OKLCHoklch(37.44% 0.162 286.6)
XYZxyz(7.8724, 4.5542, 26.8444)
Luminance0.0456 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402790 #779027
analogous
#274290 #402790 #742790
triadic
#402790 #904027 #279040
tetradic
#402790 #902742 #779027 #279074
square
#402790 #902742 #779027 #279074
split-complementary
#402790 #907427 #429027
monochromatic
#150D30 #2B1A60 #402790 #5534C0 #7A5ED3

Accessibility & contrast

On white

10.99
#402790 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#402790 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402790
10.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402790#FFFFFF#000000##FFFFFF
##4027901.0010.991.9110.99
#FFFFFF10.991.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F93
Deuteranopia (green-blind)
#00398E
Tritanopia (blue-blind)
#1E4359
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #402790;
/* rgb */ color: rgb(64, 39, 144);
/* oklch */ color: oklch(37.4% 0.162 286.6);
Tailwind
colors: {
  custom: {
    50: '#7e64b1',
    500: '#402790',
    950: '#000000',
  },
}
SCSS
$custom: #402790;
$custom-light: #7e64b1;
$custom-dark: #000000;
JSON
{
  "hex": "#402790",
  "rgb": {
    "r": 64,
    "g": 39,
    "b": 144
  },
  "hsl": {
    "h": 254.286,
    "s": 57.377,
    "l": 35.882
  },
  "oklch": {
    "l": 0.37441,
    "c": 0.162,
    "h": 286.6
  },
  "luminance": 0.04555
}

Semantic roles & 50–950 ramp

primary
#402790
secondary
#A2B95A
accent
#E147BC
background
#F8F6FB
surface
#EFEBF6
border
#CAC6D0
text
#0B0511
muted
#7C7A80

Preview Lab

Preview with #402790

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

Preview Lab → · Contrast checker → · Palette generator →

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