#400D5B#400D5B

#400D5B is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.4% C 0.130 H 310.2°. Best body text is #FFFFFF at 14.72:1 contrast (WCAG AA passes).

Color values

HEX#400D5B
RGBrgb(64, 13, 91)
HSLhsl(279, 75%, 20%)
HSVhsv(279, 86%, 36%)
CMYKcmyk(29.7%, 85.7%, 0%, 64.3%)
CIE-LABlab(16.17, 37.34, -35.03)
CIE-LCHlch(16.17, 51.20, 316.83°)
OKLaboklab(29.43% 0.0839 -0.0994)
OKLCHoklch(29.43% 0.13 310.2)
XYZxyz(4.1462, 2.1333, 10.0888)
Luminance0.0213 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400D5B #285B0D
analogous
#190D5B #400D5B #5B0D4F
triadic
#400D5B #5B400D #0D5B40
tetradic
#400D5B #5B190D #285B0D #0D4F5B
square
#400D5B #5B190D #285B0D #0D4F5B
split-complementary
#400D5B #4F5B0D #0D5B19
monochromatic
#13041B #1A0525 #400D5B #661591 #8B1CC6

Accessibility & contrast

On white

14.72
#400D5B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#400D5B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #400D5B
14.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400D5B#FFFFFF#000000##FFFFFF
##400D5B1.0014.721.4314.72
#FFFFFF14.721.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00265D
Deuteranopia (green-blind)
#002959
Tritanopia (blue-blind)
#3C2134
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #400d5b;
/* rgb */ color: rgb(64, 13, 91);
/* oklch */ color: oklch(29.4% 0.130 310.2);
Tailwind
colors: {
  custom: {
    50: '#79538a',
    500: '#400d5b',
    950: '#000000',
  },
}
SCSS
$custom: #400d5b;
$custom-light: #79538a;
$custom-dark: #000000;
JSON
{
  "hex": "#400d5b",
  "rgb": {
    "r": 64,
    "g": 13,
    "b": 91
  },
  "hsl": {
    "h": 279.231,
    "s": 75,
    "l": 20.392
  },
  "oklch": {
    "l": 0.29428,
    "c": 0.1301,
    "h": 310.2
  },
  "luminance": 0.02133
}

Semantic roles & 50–950 ramp

primary
#400D5B
secondary
#52952F
accent
#F23677
background
#F7F4F8
surface
#EEE8F0
border
#C9C4CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #400D5B

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

Preview Lab → · Contrast checker → · Palette generator →

#400D5B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva