#400540#400540

#400540 is a dark, moderate purple. Relative luminance 0.016; OKLCH L 26.6% C 0.113 H 328.2°. Best body text is #FFFFFF at 15.98:1 contrast (WCAG AA passes).

Color values

HEX#400540
RGBrgb(64, 5, 64)
HSLhsl(300, 86%, 14%)
HSVhsv(300, 92%, 25%)
CMYKcmyk(0%, 92.2%, 0%, 74.9%)
CIE-LABlab(13.04, 34.48, -21.50)
CIE-LCHlch(13.04, 40.63, 328.05°)
OKLaboklab(26.55% 0.0963 -0.0597)
OKLCHoklch(26.55% 0.113 328.2)
XYZxyz(3.0940, 1.5689, 4.9894)
Luminance0.0157 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400540 #054005
analogous
#220540 #400540 #400522
triadic
#400540 #404005 #054040
tetradic
#400540 #402205 #054005 #052240
square
#400540 #402205 #054005 #052240
split-complementary
#400540 #224005 #054022
monochromatic
#1C021C #1C021C #400540 #790979 #B20EB2

Accessibility & contrast

On white

15.98
#400540 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.31
#400540 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #400540
15.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400540#FFFFFF#000000##FFFFFF
##4005401.0015.981.3115.98
#FFFFFF15.981.0021.001.00
#0000001.3121.001.0021.00
##FFFFFF15.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001D41
Deuteranopia (green-blind)
#17243F
Tritanopia (blue-blind)
#420F23
Achromatopsia (no color)
#222222

Design tokens & code

CSS
--color: #400540;
/* rgb */ color: rgb(64, 5, 64);
/* oklch */ color: oklch(26.6% 0.113 328.2);
Tailwind
colors: {
  custom: {
    50: '#784e75',
    500: '#400540',
    950: '#000000',
  },
}
SCSS
$custom: #400540;
$custom-light: #784e75;
$custom-dark: #000000;
JSON
{
  "hex": "#400540",
  "rgb": {
    "r": 64,
    "g": 5,
    "b": 64
  },
  "hsl": {
    "h": 300,
    "s": 85.507,
    "l": 13.529
  },
  "oklch": {
    "l": 0.2655,
    "c": 0.1133,
    "h": 328.2
  },
  "luminance": 0.01569
}

Semantic roles & 50–950 ramp

primary
#400540
secondary
#208120
accent
#FC2C2C
background
#F7F4F7
surface
#EDE7ED
border
#C8C3C8
text
#090208
muted
#7B787B

Preview Lab

Preview with #400540

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

Preview Lab → · Contrast checker → · Palette generator →

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