#400D5F#400D5F

#400D5F is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.8% C 0.134 H 308.1°. Best body text is #FFFFFF at 14.58:1 contrast (WCAG AA passes).

Color values

HEX#400D5F
RGBrgb(64, 13, 95)
HSLhsl(277, 76%, 21%)
HSVhsv(277, 86%, 37%)
CMYKcmyk(32.6%, 86.3%, 0%, 62.7%)
CIE-LABlab(16.52, 38.29, -37.13)
CIE-LCHlch(16.52, 53.34, 315.88°)
OKLaboklab(29.78% 0.0828 -0.1056)
OKLCHoklch(29.78% 0.134 308.1)
XYZxyz(4.3234, 2.2041, 11.0219)
Luminance0.0220 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400D5F #2C5F0D
analogous
#170D5F #400D5F #5F0D55
triadic
#400D5F #5F400D #0D5F40
tetradic
#400D5F #5F170D #2C5F0D #0D555F
square
#400D5F #5F170D #2C5F0D #0D555F
split-complementary
#400D5F #555F0D #0D5F17
monochromatic
#12041B #1C0629 #400D5F #641495 #891CCB

Accessibility & contrast

On white

14.58
#400D5F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #400D5F
14.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400D5F#FFFFFF#000000##FFFFFF
##400D5F1.0014.581.4414.58
#FFFFFF14.581.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002761
Deuteranopia (green-blind)
#00295D
Tritanopia (blue-blind)
#3B2337
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #400d5f;
/* rgb */ color: rgb(64, 13, 95);
/* oklch */ color: oklch(29.8% 0.134 308.1);
Tailwind
colors: {
  custom: {
    50: '#79538d',
    500: '#400d5f',
    950: '#000000',
  },
}
SCSS
$custom: #400d5f;
$custom-light: #79538d;
$custom-dark: #000000;
JSON
{
  "hex": "#400d5f",
  "rgb": {
    "r": 64,
    "g": 13,
    "b": 95
  },
  "hsl": {
    "h": 277.317,
    "s": 75.926,
    "l": 21.176
  },
  "oklch": {
    "l": 0.29784,
    "c": 0.13418,
    "h": 308.1
  },
  "luminance": 0.02204
}

Semantic roles & 50–950 ramp

primary
#400D5F
secondary
#57992F
accent
#F3357D
background
#F7F5F8
surface
#EEE8F0
border
#C9C4CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #400D5F

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

Preview Lab → · Contrast checker → · Palette generator →

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