#400F5D#400F5D

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

Color values

HEX#400F5D
RGBrgb(64, 15, 93)
HSLhsl(278, 72%, 21%)
HSVhsv(278, 84%, 36%)
CMYKcmyk(31.2%, 83.9%, 0%, 63.5%)
CIE-LABlab(16.61, 37.05, -35.66)
CIE-LCHlch(16.61, 51.42, 316.10°)
OKLaboklab(29.79% 0.0816 -0.1013)
OKLCHoklch(29.79% 0.13 308.9)
XYZxyz(4.2606, 2.2220, 10.5583)
Luminance0.0222 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400F5D #2C5D0F
analogous
#190F5D #400F5D #5D0F53
triadic
#400F5D #5D400F #0F5D40
tetradic
#400F5D #5D190F #2C5D0F #0F535D
square
#400F5D #5D190F #2C5D0F #0F535D
split-complementary
#400F5D #535D0F #0F5D19
monochromatic
#12041A #1C0628 #400F5D #641792 #8920C6

Accessibility & contrast

On white

14.54
#400F5D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #400F5D
14.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400F5D#FFFFFF#000000##FFFFFF
##400F5D1.0014.541.4414.54
#FFFFFF14.541.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00275F
Deuteranopia (green-blind)
#002A5B
Tritanopia (blue-blind)
#3B2336
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #400f5d;
/* rgb */ color: rgb(64, 15, 93);
/* oklch */ color: oklch(29.8% 0.130 308.9);
Tailwind
colors: {
  custom: {
    50: '#79548b',
    500: '#400f5d',
    950: '#000000',
  },
}
SCSS
$custom: #400f5d;
$custom-light: #79548b;
$custom-dark: #000000;
JSON
{
  "hex": "#400f5d",
  "rgb": {
    "r": 64,
    "g": 15,
    "b": 93
  },
  "hsl": {
    "h": 277.692,
    "s": 72.222,
    "l": 21.176
  },
  "oklch": {
    "l": 0.29791,
    "c": 0.13004,
    "h": 308.9
  },
  "luminance": 0.02222
}

Semantic roles & 50–950 ramp

primary
#400F5D
secondary
#579631
accent
#EF397D
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #400F5D

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

Preview Lab → · Contrast checker → · Palette generator →

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