#402154#402154

#402154 is a dark, moderate violet. Relative luminance 0.028; OKLCH L 31.5% C 0.093 H 310.2°. Best body text is #FFFFFF at 13.43:1 contrast (WCAG AA passes).

Color values

HEX#402154
RGBrgb(64, 33, 84)
HSLhsl(276, 44%, 23%)
HSVhsv(276, 61%, 33%)
CMYKcmyk(23.8%, 60.7%, 0%, 67.1%)
CIE-LABlab(19.30, 25.43, -25.30)
CIE-LCHlch(19.30, 35.87, 315.15°)
OKLaboklab(31.51% 0.06 -0.071)
OKLCHoklch(31.51% 0.093 310.2)
XYZxyz(4.2581, 2.8179, 8.7054)
Luminance0.0282 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402154 #355421
analogous
#262154 #402154 #54214E
triadic
#402154 #544021 #215440
tetradic
#402154 #542621 #355421 #214E54
square
#402154 #542621 #355421 #214E54
split-complementary
#402154 #4E5421 #215426
monochromatic
#110916 #1F1028 #402154 #613280 #8344AC

Accessibility & contrast

On white

13.43
#402154 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#402154 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402154
13.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402154#FFFFFF#000000##FFFFFF
##4021541.0013.431.5613.43
#FFFFFF13.431.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#112D56
Deuteranopia (green-blind)
#1C2F53
Tritanopia (blue-blind)
#3D2A37
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #402154;
/* rgb */ color: rgb(64, 33, 84);
/* oklch */ color: oklch(31.5% 0.093 310.2);
Tailwind
colors: {
  custom: {
    50: '#775e84',
    500: '#402154',
    950: '#000000',
  },
}
SCSS
$custom: #402154;
$custom-light: #775e84;
$custom-dark: #000000;
JSON
{
  "hex": "#402154",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 84
  },
  "hsl": {
    "h": 276.471,
    "s": 43.59,
    "l": 22.941
  },
  "oklch": {
    "l": 0.31505,
    "c": 0.09293,
    "h": 310.2
  },
  "luminance": 0.02818
}

Semantic roles & 50–950 ramp

primary
#402154
secondary
#628849
accent
#D35486
background
#F7F5F8
surface
#EDE9EF
border
#C8C5CA
text
#09040B
muted
#7B797C

Preview Lab

Preview with #402154

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

Preview Lab → · Contrast checker → · Palette generator →

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