#400D5E#400D5E

#400D5E is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.7% C 0.133 H 308.6°. Best body text is #FFFFFF at 14.61:1 contrast (WCAG AA passes).

Color values

HEX#400D5E
RGBrgb(64, 13, 94)
HSLhsl(278, 76%, 21%)
HSVhsv(278, 86%, 37%)
CMYKcmyk(31.9%, 86.2%, 0%, 63.1%)
CIE-LABlab(16.44, 38.05, -36.61)
CIE-LCHlch(16.44, 52.81, 316.11°)
OKLaboklab(29.69% 0.0831 -0.1041)
OKLCHoklch(29.69% 0.133 308.6)
XYZxyz(4.2782, 2.1861, 10.7841)
Luminance0.0219 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400D5E #2B5E0D
analogous
#170D5E #400D5E #5E0D53
triadic
#400D5E #5E400D #0D5E40
tetradic
#400D5E #5E170D #2B5E0D #0D535E
square
#400D5E #5E170D #2B5E0D #0D535E
split-complementary
#400D5E #535E0D #0D5E17
monochromatic
#12041B #1B0628 #400D5E #651494 #891CCA

Accessibility & contrast

On white

14.61
#400D5E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#400D5E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #400D5E
14.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400D5E#FFFFFF#000000##FFFFFF
##400D5E1.0014.611.4414.61
#FFFFFF14.611.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002760
Deuteranopia (green-blind)
#00295C
Tritanopia (blue-blind)
#3B2236
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #400d5e;
/* rgb */ color: rgb(64, 13, 94);
/* oklch */ color: oklch(29.7% 0.133 308.6);
Tailwind
colors: {
  custom: {
    50: '#79538c',
    500: '#400d5e',
    950: '#000000',
  },
}
SCSS
$custom: #400d5e;
$custom-light: #79538c;
$custom-dark: #000000;
JSON
{
  "hex": "#400d5e",
  "rgb": {
    "r": 64,
    "g": 13,
    "b": 94
  },
  "hsl": {
    "h": 277.778,
    "s": 75.701,
    "l": 20.98
  },
  "oklch": {
    "l": 0.29694,
    "c": 0.13316,
    "h": 308.6
  },
  "luminance": 0.02186
}

Semantic roles & 50–950 ramp

primary
#400D5E
secondary
#56982F
accent
#F2367B
background
#F7F5F8
surface
#EEE8F0
border
#C9C4CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #400D5E

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

Preview Lab → · Contrast checker → · Palette generator →

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