#402184#402184

#402184 is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.5% C 0.154 H 290.7°. Best body text is #FFFFFF at 11.87:1 contrast (WCAG AA passes).

Color values

HEX#402184
RGBrgb(64, 33, 132)
HSLhsl(259, 60%, 32%)
HSVhsv(259, 75%, 52%)
CMYKcmyk(51.5%, 75%, 0%, 48.2%)
CIE-LABlab(23.15, 39.05, -50.23)
CIE-LCHlch(23.15, 63.63, 307.86°)
OKLaboklab(35.48% 0.0544 -0.1442)
OKLCHoklch(35.48% 0.154 290.7)
XYZxyz(6.8219, 3.8434, 22.2077)
Luminance0.0384 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402184 #658421
analogous
#213384 #402184 #722184
triadic
#402184 #844021 #218440
tetradic
#402184 #842133 #658421 #218472
square
#402184 #842133 #658421 #218472
split-complementary
#402184 #847221 #338421
monochromatic
#110922 #281553 #402184 #582DB5 #774DD2

Accessibility & contrast

On white

11.87
#402184 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#402184 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402184
11.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402184#FFFFFF#000000##FFFFFF
##4021841.0011.871.7711.87
#FFFFFF11.871.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003987
Deuteranopia (green-blind)
#003582
Tritanopia (blue-blind)
#293B50
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402184;
/* rgb */ color: rgb(64, 33, 132);
/* oklch */ color: oklch(35.5% 0.154 290.7);
Tailwind
colors: {
  custom: {
    50: '#7c5fa9',
    500: '#402184',
    950: '#000000',
  },
}
SCSS
$custom: #402184;
$custom-light: #7c5fa9;
$custom-dark: #000000;
JSON
{
  "hex": "#402184",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 132
  },
  "hsl": {
    "h": 258.788,
    "s": 60,
    "l": 32.353
  },
  "oklch": {
    "l": 0.35483,
    "c": 0.15413,
    "h": 290.7
  },
  "luminance": 0.03844
}

Semantic roles & 50–950 ramp

primary
#402184
secondary
#94B64B
accent
#E345B2
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #402184

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

Preview Lab → · Contrast checker → · Palette generator →

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