#402489#402489

#402489 is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.4% C 0.157 H 288.8°. Best body text is #FFFFFF at 11.47:1 contrast (WCAG AA passes).

Color values

HEX#402489
RGBrgb(64, 36, 137)
HSLhsl(257, 58%, 34%)
HSVhsv(257, 74%, 54%)
CMYKcmyk(53.3%, 73.7%, 0%, 46.3%)
CIE-LABlab(24.19, 38.93, -51.67)
CIE-LCHlch(24.19, 64.69, 307.00°)
OKLaboklab(36.36% 0.0505 -0.1484)
OKLCHoklch(36.36% 0.157 288.8)
XYZxyz(7.2593, 4.1575, 24.0820)
Luminance0.0416 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402489 #6D8924
analogous
#243A89 #402489 #732489
triadic
#402489 #894024 #248940
tetradic
#402489 #89243A #6D8924 #248973
square
#402489 #89243A #6D8924 #248973
split-complementary
#402489 #897324 #3A8924
monochromatic
#130B28 #291759 #402489 #5731B9 #7855D2

Accessibility & contrast

On white

11.47
#402489 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #402489
11.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402489#FFFFFF#000000##FFFFFF
##4024891.0011.471.8311.47
#FFFFFF11.471.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8C
Deuteranopia (green-blind)
#003787
Tritanopia (blue-blind)
#253F54
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #402489;
/* rgb */ color: rgb(64, 36, 137);
/* oklch */ color: oklch(36.4% 0.157 288.8);
Tailwind
colors: {
  custom: {
    50: '#7d61ac',
    500: '#402489',
    950: '#000000',
  },
}
SCSS
$custom: #402489;
$custom-light: #7d61ac;
$custom-dark: #000000;
JSON
{
  "hex": "#402489",
  "rgb": {
    "r": 64,
    "g": 36,
    "b": 137
  },
  "hsl": {
    "h": 256.634,
    "s": 58.382,
    "l": 33.922
  },
  "oklch": {
    "l": 0.36362,
    "c": 0.15679,
    "h": 288.8
  },
  "luminance": 0.04158
}

Semantic roles & 50–950 ramp

primary
#402489
secondary
#9BB752
accent
#E246B7
background
#F8F5FA
surface
#EFEAF4
border
#CAC6CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402489

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

Preview Lab → · Contrast checker → · Palette generator →

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