#40173B#40173B

#40173B is a dark, moderate purple. Relative luminance 0.020; OKLCH L 28.3% C 0.082 H 332.5°. Best body text is #FFFFFF at 14.96:1 contrast (WCAG AA passes).

Color values

HEX#40173B
RGBrgb(64, 23, 59)
HSLhsl(307, 47%, 17%)
HSVhsv(307, 64%, 25%)
CMYKcmyk(0%, 64.1%, 7.8%, 74.9%)
CIE-LABlab(15.59, 25.48, -13.95)
CIE-LCHlch(15.59, 29.05, 331.29°)
OKLaboklab(28.29% 0.073 -0.0381)
OKLCHoklch(28.29% 0.082 332.5)
XYZxyz(3.2102, 2.0188, 4.3574)
Luminance0.0202 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40173B #17401C
analogous
#311740 #40173B #401727
triadic
#40173B #3B4017 #173B40
tetradic
#40173B #403117 #17401C #172740
square
#40173B #403117 #17401C #172740
split-complementary
#40173B #274017 #174031
monochromatic
#170815 #170815 #40173B #6D2765 #9A378E

Accessibility & contrast

On white

14.96
#40173B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.40
#40173B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40173B
14.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40173B#FFFFFF#000000##FFFFFF
##40173B1.0014.961.4014.96
#FFFFFF14.961.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF14.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#16233C
Deuteranopia (green-blind)
#22293A
Tritanopia (blue-blind)
#431A26
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #40173b;
/* rgb */ color: rgb(64, 23, 59);
/* oklch */ color: oklch(28.3% 0.082 332.5);
Tailwind
colors: {
  custom: {
    50: '#765771',
    500: '#40173b',
    950: '#000000',
  },
}
SCSS
$custom: #40173b;
$custom-light: #765771;
$custom-dark: #000000;
JSON
{
  "hex": "#40173b",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 59
  },
  "hsl": {
    "h": 307.317,
    "s": 47.126,
    "l": 17.059
  },
  "oklch": {
    "l": 0.28288,
    "c": 0.08231,
    "h": 332.5
  },
  "luminance": 0.02019
}

Semantic roles & 50–950 ramp

primary
#40173B
secondary
#3C7743
accent
#D76151
background
#F7F5F6
surface
#EDE9EC
border
#C8C5C7
text
#090307
muted
#7B787A

Preview Lab

Preview with #40173B

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

Preview Lab → · Contrast checker → · Palette generator →

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