#400740#400740

#400740 is a dark, moderate purple. Relative luminance 0.016; OKLCH L 26.7% C 0.111 H 328.1°. Best body text is #FFFFFF at 15.88:1 contrast (WCAG AA passes).

Color values

HEX#400740
RGBrgb(64, 7, 64)
HSLhsl(300, 80%, 14%)
HSVhsv(300, 89%, 25%)
CMYKcmyk(0%, 89.1%, 0%, 74.9%)
CIE-LABlab(13.30, 33.71, -21.08)
CIE-LCHlch(13.30, 39.75, 327.98°)
OKLaboklab(26.74% 0.0941 -0.0585)
OKLCHoklch(26.74% 0.111 328.1)
XYZxyz(3.1157, 1.6123, 4.9966)
Luminance0.0161 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400740 #074007
analogous
#240740 #400740 #400724
triadic
#400740 #404007 #074040
tetradic
#400740 #402407 #074007 #072440
square
#400740 #402407 #074007 #072440
split-complementary
#400740 #244007 #074024
monochromatic
#1C031C #1C031C #400740 #770D77 #AE13AE

Accessibility & contrast

On white

15.88
#400740 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.32
#400740 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #400740
15.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400740#FFFFFF#000000##FFFFFF
##4007401.0015.881.3215.88
#FFFFFF15.881.0021.001.00
#0000001.3221.001.0021.00
##FFFFFF15.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001D41
Deuteranopia (green-blind)
#18253F
Tritanopia (blue-blind)
#421124
Achromatopsia (no color)
#222222

Design tokens & code

CSS
--color: #400740;
/* rgb */ color: rgb(64, 7, 64);
/* oklch */ color: oklch(26.7% 0.111 328.1);
Tailwind
colors: {
  custom: {
    50: '#774f75',
    500: '#400740',
    950: '#000000',
  },
}
SCSS
$custom: #400740;
$custom-light: #774f75;
$custom-dark: #000000;
JSON
{
  "hex": "#400740",
  "rgb": {
    "r": 64,
    "g": 7,
    "b": 64
  },
  "hsl": {
    "h": 300,
    "s": 80.282,
    "l": 13.922
  },
  "oklch": {
    "l": 0.26738,
    "c": 0.11079,
    "h": 328.1
  },
  "luminance": 0.01612
}

Semantic roles & 50–950 ramp

primary
#400740
secondary
#247F24
accent
#F73131
background
#F7F4F7
surface
#EDE7ED
border
#C8C3C8
text
#090208
muted
#7B787B

Preview Lab

Preview with #400740

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

Preview Lab → · Contrast checker → · Palette generator →

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