#400F5F#400F5F

#400F5F is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.0% C 0.132 H 307.8°. Best body text is #FFFFFF at 14.47:1 contrast (WCAG AA passes).

Color values

HEX#400F5F
RGBrgb(64, 15, 95)
HSLhsl(277, 73%, 22%)
HSVhsv(277, 84%, 37%)
CMYKcmyk(32.6%, 84.2%, 0%, 62.7%)
CIE-LABlab(16.79, 37.53, -36.71)
CIE-LCHlch(16.79, 52.50, 315.64°)
OKLaboklab(29.97% 0.0811 -0.1044)
OKLCHoklch(29.97% 0.132 307.8)
XYZxyz(4.3503, 2.2579, 11.0309)
Luminance0.0226 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400F5F #2E5F0F
analogous
#180F5F #400F5F #5F0F56
triadic
#400F5F #5F400F #0F5F40
tetradic
#400F5F #5F180F #2E5F0F #0F565F
square
#400F5F #5F180F #2E5F0F #0F565F
split-complementary
#400F5F #565F0F #0F5F18
monochromatic
#12041A #1C072A #400F5F #641794 #8720C9

Accessibility & contrast

On white

14.47
#400F5F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#400F5F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #400F5F
14.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400F5F#FFFFFF#000000##FFFFFF
##400F5F1.0014.471.4514.47
#FFFFFF14.471.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002861
Deuteranopia (green-blind)
#002A5D
Tritanopia (blue-blind)
#3B2437
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #400f5f;
/* rgb */ color: rgb(64, 15, 95);
/* oklch */ color: oklch(30.0% 0.132 307.8);
Tailwind
colors: {
  custom: {
    50: '#79548d',
    500: '#400f5f',
    950: '#000000',
  },
}
SCSS
$custom: #400f5f;
$custom-light: #79548d;
$custom-dark: #000000;
JSON
{
  "hex": "#400f5f",
  "rgb": {
    "r": 64,
    "g": 15,
    "b": 95
  },
  "hsl": {
    "h": 276.75,
    "s": 72.727,
    "l": 21.569
  },
  "oklch": {
    "l": 0.29968,
    "c": 0.13214,
    "h": 307.8
  },
  "luminance": 0.02258
}

Semantic roles & 50–950 ramp

primary
#400F5F
secondary
#599832
accent
#EF387F
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #400F5F

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

Preview Lab → · Contrast checker → · Palette generator →

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