#400F52#400F52

#400F52 is a dark, moderate purple. Relative luminance 0.020; OKLCH L 28.9% C 0.119 H 315.0°. Best body text is #FFFFFF at 14.91:1 contrast (WCAG AA passes).

Color values

HEX#400F52
RGBrgb(64, 15, 82)
HSLhsl(284, 69%, 19%)
HSVhsv(284, 82%, 32%)
CMYKcmyk(22%, 81.7%, 0%, 67.8%)
CIE-LABlab(15.70, 34.45, -29.71)
CIE-LCHlch(15.70, 45.49, 319.22°)
OKLaboklab(28.86% 0.0839 -0.0838)
OKLCHoklch(28.86% 0.119 315)
XYZxyz(3.8079, 2.0410, 8.1744)
Luminance0.0204 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400F52 #21520F
analogous
#1F0F52 #400F52 #520F43
triadic
#400F52 #52400F #0F5240
tetradic
#400F52 #521F0F #21520F #0F4352
square
#400F52 #521F0F #21520F #0F4352
split-complementary
#400F52 #43520F #0F521F
monochromatic
#14051A #18061E #400F52 #681886 #9122B9

Accessibility & contrast

On white

14.91
#400F52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.41
#400F52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #400F52
14.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400F52#FFFFFF#000000##FFFFFF
##400F521.0014.911.4114.91
#FFFFFF14.911.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002454
Deuteranopia (green-blind)
#0C2851
Tritanopia (blue-blind)
#3E1E30
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #400f52;
/* rgb */ color: rgb(64, 15, 82);
/* oklch */ color: oklch(28.9% 0.119 315.0);
Tailwind
colors: {
  custom: {
    50: '#785383',
    500: '#400f52',
    950: '#000000',
  },
}
SCSS
$custom: #400f52;
$custom-light: #785383;
$custom-dark: #000000;
JSON
{
  "hex": "#400f52",
  "rgb": {
    "r": 64,
    "g": 15,
    "b": 82
  },
  "hsl": {
    "h": 283.881,
    "s": 69.072,
    "l": 19.02
  },
  "oklch": {
    "l": 0.28862,
    "c": 0.1186,
    "h": 315
  },
  "luminance": 0.02041
}

Semantic roles & 50–950 ramp

primary
#400F52
secondary
#498C31
accent
#EC3C6B
background
#F7F4F8
surface
#EDE8EF
border
#C8C4CA
text
#09030A
muted
#7B787C

Preview Lab

Preview with #400F52

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

Preview Lab → · Contrast checker → · Palette generator →

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