#40154B#40154B

#40154B is a dark, moderate purple. Relative luminance 0.021; OKLCH L 29.0% C 0.103 H 318.8°. Best body text is #FFFFFF at 14.72:1 contrast (WCAG AA passes).

Color values

HEX#40154B
RGBrgb(64, 21, 75)
HSLhsl(288, 56%, 19%)
HSVhsv(288, 72%, 29%)
CMYKcmyk(14.7%, 72%, 0%, 70.6%)
CIE-LABlab(16.18, 30.03, -24.16)
CIE-LCHlch(16.18, 38.54, 321.18°)
OKLaboklab(29.04% 0.0773 -0.0676)
OKLCHoklch(29.04% 0.103 318.8)
XYZxyz(3.6523, 2.1345, 6.8749)
Luminance0.0213 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40154B #204B15
analogous
#25154B #40154B #4B153B
triadic
#40154B #4B4015 #154B40
tetradic
#40154B #4B2515 #204B15 #153B4B
square
#40154B #4B2515 #204B15 #153B4B
split-complementary
#40154B #3B4B15 #154B25
monochromatic
#140718 #17081B #40154B #69227B #9230AB

Accessibility & contrast

On white

14.72
#40154B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40154B
14.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40154B#FFFFFF#000000##FFFFFF
##40154B1.0014.721.4314.72
#FFFFFF14.721.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#04254D
Deuteranopia (green-blind)
#182A4A
Tritanopia (blue-blind)
#401F2E
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #40154b;
/* rgb */ color: rgb(64, 21, 75);
/* oklch */ color: oklch(29.0% 0.103 318.8);
Tailwind
colors: {
  custom: {
    50: '#77567d',
    500: '#40154b',
    950: '#000000',
  },
}
SCSS
$custom: #40154b;
$custom-light: #77567d;
$custom-dark: #000000;
JSON
{
  "hex": "#40154b",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 75
  },
  "hsl": {
    "h": 287.778,
    "s": 56.25,
    "l": 18.824
  },
  "oklch": {
    "l": 0.29038,
    "c": 0.1027,
    "h": 318.8
  },
  "luminance": 0.02134
}

Semantic roles & 50–950 ramp

primary
#40154B
secondary
#488339
accent
#E04867
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40154B

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

Preview Lab → · Contrast checker → · Palette generator →

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