#402189#402189

#402189 is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.0% C 0.160 H 289.4°. Best body text is #FFFFFF at 11.69:1 contrast (WCAG AA passes).

Color values

HEX#402189
RGBrgb(64, 33, 137)
HSLhsl(258, 61%, 33%)
HSVhsv(258, 76%, 54%)
CMYKcmyk(53.3%, 75.9%, 0%, 46.3%)
CIE-LABlab(23.62, 40.53, -52.60)
CIE-LCHlch(23.62, 66.40, 307.61°)
OKLaboklab(35.96% 0.0532 -0.1511)
OKLCHoklch(35.96% 0.16 289.4)
XYZxyz(7.1723, 3.9835, 24.0530)
Luminance0.0398 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402189 #6A8921
analogous
#213689 #402189 #742189
triadic
#402189 #894021 #218940
tetradic
#402189 #892136 #6A8921 #218974
square
#402189 #892136 #6A8921 #218974
split-complementary
#402189 #897421 #368921
monochromatic
#120926 #291558 #402189 #572DBA #7750D5

Accessibility & contrast

On white

11.69
#402189 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#402189 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402189
11.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402189#FFFFFF#000000##FFFFFF
##4021891.0011.691.8011.69
#FFFFFF11.691.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8C
Deuteranopia (green-blind)
#003687
Tritanopia (blue-blind)
#253D53
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #402189;
/* rgb */ color: rgb(64, 33, 137);
/* oklch */ color: oklch(36.0% 0.160 289.4);
Tailwind
colors: {
  custom: {
    50: '#7d60ac',
    500: '#402189',
    950: '#000000',
  },
}
SCSS
$custom: #402189;
$custom-light: #7d60ac;
$custom-dark: #000000;
JSON
{
  "hex": "#402189",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 137
  },
  "hsl": {
    "h": 257.885,
    "s": 61.176,
    "l": 33.333
  },
  "oklch": {
    "l": 0.35959,
    "c": 0.16022,
    "h": 289.4
  },
  "luminance": 0.03984
}

Semantic roles & 50–950 ramp

primary
#402189
secondary
#98B84E
accent
#E444B4
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402189

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

Preview Lab → · Contrast checker → · Palette generator →

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