#400C5B#400C5B

#400C5B is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.3% C 0.131 H 310.3°. Best body text is #FFFFFF at 14.77:1 contrast (WCAG AA passes).

Color values

HEX#400C5B
RGBrgb(64, 12, 91)
HSLhsl(279, 77%, 20%)
HSVhsv(279, 87%, 36%)
CMYKcmyk(29.7%, 86.8%, 0%, 64.3%)
CIE-LABlab(16.05, 37.71, -35.24)
CIE-LCHlch(16.05, 51.61, 316.94°)
OKLaboklab(29.34% 0.0848 -0.1)
OKLCHoklch(29.34% 0.131 310.3)
XYZxyz(4.1338, 2.1084, 10.0847)
Luminance0.0211 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400C5B #275B0C
analogous
#190C5B #400C5B #5B0C4E
triadic
#400C5B #5B400C #0C5B40
tetradic
#400C5B #5B190C #275B0C #0C4E5B
square
#400C5B #5B190C #275B0C #0C4E5B
split-complementary
#400C5B #4E5B0C #0C5B19
monochromatic
#13041B #1A0525 #400C5B #661391 #8C1AC7

Accessibility & contrast

On white

14.77
#400C5B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#400C5B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #400C5B
14.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400C5B#FFFFFF#000000##FFFFFF
##400C5B1.0014.771.4214.77
#FFFFFF14.771.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00265D
Deuteranopia (green-blind)
#002959
Tritanopia (blue-blind)
#3C2134
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #400c5b;
/* rgb */ color: rgb(64, 12, 91);
/* oklch */ color: oklch(29.3% 0.131 310.3);
Tailwind
colors: {
  custom: {
    50: '#79538a',
    500: '#400c5b',
    950: '#000000',
  },
}
SCSS
$custom: #400c5b;
$custom-light: #79538a;
$custom-dark: #000000;
JSON
{
  "hex": "#400c5b",
  "rgb": {
    "r": 64,
    "g": 12,
    "b": 91
  },
  "hsl": {
    "h": 279.494,
    "s": 76.699,
    "l": 20.196
  },
  "oklch": {
    "l": 0.2934,
    "c": 0.1311,
    "h": 310.3
  },
  "luminance": 0.02108
}

Semantic roles & 50–950 ramp

primary
#400C5B
secondary
#51962D
accent
#F33576
background
#F7F4F8
surface
#EEE7F0
border
#C9C3CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #400C5B

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

Preview Lab → · Contrast checker → · Palette generator →

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