#40174B#40174B

#40174B is a dark, moderate purple. Relative luminance 0.022; OKLCH L 29.3% C 0.099 H 318.6°. Best body text is #FFFFFF at 14.56:1 contrast (WCAG AA passes).

Color values

HEX#40174B
RGBrgb(64, 23, 75)
HSLhsl(287, 53%, 19%)
HSVhsv(287, 69%, 29%)
CMYKcmyk(14.7%, 69.3%, 0%, 70.6%)
CIE-LABlab(16.56, 28.98, -23.56)
CIE-LCHlch(16.56, 37.35, 320.89°)
OKLaboklab(29.31% 0.0746 -0.0658)
OKLCHoklch(29.31% 0.099 318.6)
XYZxyz(3.6906, 2.2109, 6.8876)
Luminance0.0221 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40174B #224B17
analogous
#26174B #40174B #4B173C
triadic
#40174B #4B4017 #174B40
tetradic
#40174B #4B2617 #224B17 #173C4B
square
#40174B #4B2617 #224B17 #173C4B
split-complementary
#40174B #3C4B17 #174B26
monochromatic
#140717 #18091C #40174B #68257A #9034A9

Accessibility & contrast

On white

14.56
#40174B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#40174B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40174B
14.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40174B#FFFFFF#000000##FFFFFF
##40174B1.0014.561.4414.56
#FFFFFF14.561.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#08264D
Deuteranopia (green-blind)
#1A2A4A
Tritanopia (blue-blind)
#40202E
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #40174b;
/* rgb */ color: rgb(64, 23, 75);
/* oklch */ color: oklch(29.3% 0.099 318.6);
Tailwind
colors: {
  custom: {
    50: '#77577d',
    500: '#40174b',
    950: '#000000',
  },
}
SCSS
$custom: #40174b;
$custom-light: #77577d;
$custom-dark: #000000;
JSON
{
  "hex": "#40174b",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 75
  },
  "hsl": {
    "h": 287.308,
    "s": 53.061,
    "l": 19.216
  },
  "oklch": {
    "l": 0.29312,
    "c": 0.09946,
    "h": 318.6
  },
  "luminance": 0.02211
}

Semantic roles & 50–950 ramp

primary
#40174B
secondary
#4B823C
accent
#DC4B6A
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40174B

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

Preview Lab → · Contrast checker → · Palette generator →

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