#400C5F#400C5F

#400C5F is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.7% C 0.135 H 308.2°. Best body text is #FFFFFF at 14.63:1 contrast (WCAG AA passes).

Color values

HEX#400C5F
RGBrgb(64, 12, 95)
HSLhsl(278, 78%, 21%)
HSVhsv(278, 87%, 37%)
CMYKcmyk(32.6%, 87.4%, 0%, 62.7%)
CIE-LABlab(16.40, 38.65, -37.33)
CIE-LCHlch(16.40, 53.74, 315.99°)
OKLaboklab(29.7% 0.0836 -0.1062)
OKLCHoklch(29.7% 0.135 308.2)
XYZxyz(4.3109, 2.1792, 11.0178)
Luminance0.0218 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400C5F #2B5F0C
analogous
#160C5F #400C5F #5F0C54
triadic
#400C5F #5F400C #0C5F40
tetradic
#400C5F #5F160C #2B5F0C #0C545F
square
#400C5F #5F160C #2B5F0C #0C545F
split-complementary
#400C5F #545F0C #0C5F16
monochromatic
#12031B #1B0529 #400C5F #651395 #891ACC

Accessibility & contrast

On white

14.63
#400C5F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #400C5F
14.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400C5F#FFFFFF#000000##FFFFFF
##400C5F1.0014.631.4414.63
#FFFFFF14.631.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002761
Deuteranopia (green-blind)
#00295D
Tritanopia (blue-blind)
#3B2237
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #400c5f;
/* rgb */ color: rgb(64, 12, 95);
/* oklch */ color: oklch(29.7% 0.135 308.2);
Tailwind
colors: {
  custom: {
    50: '#79538d',
    500: '#400c5f',
    950: '#000000',
  },
}
SCSS
$custom: #400c5f;
$custom-light: #79538d;
$custom-dark: #000000;
JSON
{
  "hex": "#400c5f",
  "rgb": {
    "r": 64,
    "g": 12,
    "b": 95
  },
  "hsl": {
    "h": 277.59,
    "s": 77.57,
    "l": 20.98
  },
  "oklch": {
    "l": 0.29699,
    "c": 0.13515,
    "h": 308.2
  },
  "luminance": 0.02179
}

Semantic roles & 50–950 ramp

primary
#400C5F
secondary
#56992D
accent
#F4347C
background
#F7F4F8
surface
#EEE8F0
border
#C9C4CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #400C5F

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

Preview Lab → · Contrast checker → · Palette generator →

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