#402159#402159

#402159 is a dark, moderate violet. Relative luminance 0.029; OKLCH L 31.9% C 0.099 H 307.2°. Best body text is #FFFFFF at 13.29:1 contrast (WCAG AA passes).

Color values

HEX#402159
RGBrgb(64, 33, 89)
HSLhsl(273, 46%, 24%)
HSVhsv(273, 63%, 35%)
CMYKcmyk(28.1%, 62.9%, 0%, 65.1%)
CIE-LABlab(19.63, 26.76, -28.11)
CIE-LCHlch(19.63, 38.81, 313.59°)
OKLaboklab(31.86% 0.0601 -0.0792)
OKLCHoklch(31.86% 0.099 307.2)
XYZxyz(4.4610, 2.8990, 9.7738)
Luminance0.0290 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402159 #3A5921
analogous
#242159 #402159 #592156
triadic
#402159 #594021 #215940
tetradic
#402159 #592421 #3A5921 #215659
square
#402159 #592421 #3A5921 #215659
split-complementary
#402159 #565921 #215924
monochromatic
#100816 #20102C #402159 #603286 #8042B2

Accessibility & contrast

On white

13.29
#402159 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#402159 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402159
13.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402159#FFFFFF#000000##FFFFFF
##4021591.0013.291.5813.29
#FFFFFF13.291.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0B2E5B
Deuteranopia (green-blind)
#183058
Tritanopia (blue-blind)
#3C2C39
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #402159;
/* rgb */ color: rgb(64, 33, 89);
/* oklch */ color: oklch(31.9% 0.099 307.2);
Tailwind
colors: {
  custom: {
    50: '#775e88',
    500: '#402159',
    950: '#000000',
  },
}
SCSS
$custom: #402159;
$custom-light: #775e88;
$custom-dark: #000000;
JSON
{
  "hex": "#402159",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 89
  },
  "hsl": {
    "h": 273.214,
    "s": 45.902,
    "l": 23.922
  },
  "oklch": {
    "l": 0.31859,
    "c": 0.09946,
    "h": 307.2
  },
  "luminance": 0.02899
}

Semantic roles & 50–950 ramp

primary
#402159
secondary
#678D49
accent
#D6528D
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09040B
muted
#7B797C

Preview Lab

Preview with #402159

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

Preview Lab → · Contrast checker → · Palette generator →

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