#40174E#40174E

#40174E is a dark, moderate purple. Relative luminance 0.023; OKLCH L 29.5% C 0.103 H 316.4°. Best body text is #FFFFFF at 14.48:1 contrast (WCAG AA passes).

Color values

HEX#40174E
RGBrgb(64, 23, 78)
HSLhsl(285, 54%, 20%)
HSVhsv(285, 71%, 31%)
CMYKcmyk(17.9%, 70.5%, 0%, 69.4%)
CIE-LABlab(16.76, 29.69, -25.28)
CIE-LCHlch(16.76, 38.99, 319.58°)
OKLaboklab(29.53% 0.0745 -0.0709)
OKLCHoklch(29.53% 0.103 316.4)
XYZxyz(3.7957, 2.2530, 7.4412)
Luminance0.0225 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40174E #254E17
analogous
#25174E #40174E #4E1741
triadic
#40174E #4E4017 #174E40
tetradic
#40174E #4E2517 #254E17 #17414E
square
#40174E #4E2517 #254E17 #17414E
split-complementary
#40174E #414E17 #174E25
monochromatic
#130718 #19091F #40174E #67257D #8E33AD

Accessibility & contrast

On white

14.48
#40174E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#40174E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40174E
14.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40174E#FFFFFF#000000##FFFFFF
##40174E1.0014.481.4514.48
#FFFFFF14.481.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#042750
Deuteranopia (green-blind)
#172B4D
Tritanopia (blue-blind)
#3F2130
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #40174e;
/* rgb */ color: rgb(64, 23, 78);
/* oklch */ color: oklch(29.5% 0.103 316.4);
Tailwind
colors: {
  custom: {
    50: '#775780',
    500: '#40174e',
    950: '#000000',
  },
}
SCSS
$custom: #40174e;
$custom-light: #775780;
$custom-dark: #000000;
JSON
{
  "hex": "#40174e",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 78
  },
  "hsl": {
    "h": 284.727,
    "s": 54.455,
    "l": 19.804
  },
  "oklch": {
    "l": 0.29527,
    "c": 0.10285,
    "h": 316.4
  },
  "luminance": 0.02253
}

Semantic roles & 50–950 ramp

primary
#40174E
secondary
#4E853C
accent
#DE4A70
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40174E

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

Preview Lab → · Contrast checker → · Palette generator →

#40174E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva