#400C5A#400C5A

#400C5A is a dark, vivid purple. Relative luminance 0.021; OKLCH L 29.3% C 0.130 H 310.8°. Best body text is #FFFFFF at 14.81:1 contrast (WCAG AA passes).

Color values

HEX#400C5A
RGBrgb(64, 12, 90)
HSLhsl(280, 76%, 20%)
HSVhsv(280, 87%, 35%)
CMYKcmyk(28.9%, 86.7%, 0%, 64.7%)
CIE-LABlab(15.96, 37.47, -34.71)
CIE-LCHlch(15.96, 51.08, 317.19°)
OKLaboklab(29.25% 0.085 -0.0985)
OKLCHoklch(29.25% 0.13 310.8)
XYZxyz(4.0909, 2.0912, 9.8590)
Luminance0.0209 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400C5A #265A0C
analogous
#190C5A #400C5A #5A0C4D
triadic
#400C5A #5A400C #0C5A40
tetradic
#400C5A #5A190C #265A0C #0C4D5A
square
#400C5A #5A190C #265A0C #0C4D5A
split-complementary
#400C5A #4D5A0C #0C5A19
monochromatic
#13041B #1A0524 #400C5A #661390 #8D1AC6

Accessibility & contrast

On white

14.81
#400C5A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #400C5A
14.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400C5A#FFFFFF#000000##FFFFFF
##400C5A1.0014.811.4214.81
#FFFFFF14.811.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00255C
Deuteranopia (green-blind)
#002858
Tritanopia (blue-blind)
#3C2034
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #400c5a;
/* rgb */ color: rgb(64, 12, 90);
/* oklch */ color: oklch(29.3% 0.130 310.8);
Tailwind
colors: {
  custom: {
    50: '#795389',
    500: '#400c5a',
    950: '#000000',
  },
}
SCSS
$custom: #400c5a;
$custom-light: #795389;
$custom-dark: #000000;
JSON
{
  "hex": "#400c5a",
  "rgb": {
    "r": 64,
    "g": 12,
    "b": 90
  },
  "hsl": {
    "h": 280,
    "s": 76.471,
    "l": 20
  },
  "oklch": {
    "l": 0.29252,
    "c": 0.13009,
    "h": 310.8
  },
  "luminance": 0.02091
}

Semantic roles & 50–950 ramp

primary
#400C5A
secondary
#50952D
accent
#F33574
background
#F7F4F8
surface
#EEE7F0
border
#C9C3CB
text
#09030B
muted
#7B787C

Preview Lab

Preview with #400C5A

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

Preview Lab → · Contrast checker → · Palette generator →

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