#400F5B#400F5B

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

Color values

HEX#400F5B
RGBrgb(64, 15, 91)
HSLhsl(279, 72%, 21%)
HSVhsv(279, 84%, 36%)
CMYKcmyk(29.7%, 83.5%, 0%, 64.3%)
CIE-LABlab(16.44, 36.56, -34.60)
CIE-LCHlch(16.44, 50.34, 316.58°)
OKLaboklab(29.62% 0.0821 -0.0982)
OKLCHoklch(29.62% 0.128 309.9)
XYZxyz(4.1731, 2.1871, 10.0978)
Luminance0.0219 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400F5B #2A5B0F
analogous
#1A0F5B #400F5B #5B0F50
triadic
#400F5B #5B400F #0F5B40
tetradic
#400F5B #5B1A0F #2A5B0F #0F505B
square
#400F5B #5B1A0F #2A5B0F #0F505B
split-complementary
#400F5B #505B0F #0F5B1A
monochromatic
#12041A #1B0626 #400F5B #651890 #8A20C4

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##400F5B#FFFFFF#000000##FFFFFF
##400F5B1.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)
#00275D
Deuteranopia (green-blind)
#002959
Tritanopia (blue-blind)
#3C2235
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #400f5b;
/* rgb */ color: rgb(64, 15, 91);
/* oklch */ color: oklch(29.6% 0.128 309.9);
Tailwind
colors: {
  custom: {
    50: '#78548a',
    500: '#400f5b',
    950: '#000000',
  },
}
SCSS
$custom: #400f5b;
$custom-light: #78548a;
$custom-dark: #000000;
JSON
{
  "hex": "#400f5b",
  "rgb": {
    "r": 64,
    "g": 15,
    "b": 91
  },
  "hsl": {
    "h": 278.684,
    "s": 71.698,
    "l": 20.784
  },
  "oklch": {
    "l": 0.29616,
    "c": 0.12796,
    "h": 309.9
  },
  "luminance": 0.02187
}

Semantic roles & 50–950 ramp

primary
#400F5B
secondary
#559531
accent
#EE397A
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #400F5B

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

Preview Lab → · Contrast checker → · Palette generator →

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