#40154D#40154D

#40154D is a dark, moderate purple. Relative luminance 0.022; OKLCH L 29.2% C 0.105 H 317.4°. Best body text is #FFFFFF at 14.66:1 contrast (WCAG AA passes).

Color values

HEX#40154D
RGBrgb(64, 21, 77)
HSLhsl(286, 57%, 19%)
HSVhsv(286, 73%, 30%)
CMYKcmyk(16.9%, 72.7%, 0%, 69.8%)
CIE-LABlab(16.32, 30.49, -25.31)
CIE-LCHlch(16.32, 39.63, 320.31°)
OKLaboklab(29.18% 0.0773 -0.0709)
OKLCHoklch(29.18% 0.105 317.4)
XYZxyz(3.7219, 2.1623, 7.2411)
Luminance0.0216 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40154D #224D15
analogous
#24154D #40154D #4D153E
triadic
#40154D #4D4015 #154D40
tetradic
#40154D #4D2415 #224D15 #153E4D
square
#40154D #4D2415 #224D15 #153E4D
split-complementary
#40154D #3E4D15 #154D24
monochromatic
#140718 #18081D #40154D #68227D #902FAD

Accessibility & contrast

On white

14.66
#40154D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#40154D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40154D
14.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40154D#FFFFFF#000000##FFFFFF
##40154D1.0014.661.4314.66
#FFFFFF14.661.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#02264F
Deuteranopia (green-blind)
#172A4C
Tritanopia (blue-blind)
#401F2F
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #40154d;
/* rgb */ color: rgb(64, 21, 77);
/* oklch */ color: oklch(29.2% 0.105 317.4);
Tailwind
colors: {
  custom: {
    50: '#77567f',
    500: '#40154d',
    950: '#000000',
  },
}
SCSS
$custom: #40154d;
$custom-light: #77567f;
$custom-dark: #000000;
JSON
{
  "hex": "#40154d",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 77
  },
  "hsl": {
    "h": 286.071,
    "s": 57.143,
    "l": 19.216
  },
  "oklch": {
    "l": 0.29183,
    "c": 0.1049,
    "h": 317.4
  },
  "luminance": 0.02162
}

Semantic roles & 50–950 ramp

primary
#40154D
secondary
#4B8539
accent
#E0476B
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40154D

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

Preview Lab → · Contrast checker → · Palette generator →

#40154D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva