#40173A#40173A

#40173A is a dark, moderate purple. Relative luminance 0.020; OKLCH L 28.2% C 0.081 H 333.5°. Best body text is #FFFFFF at 14.98:1 contrast (WCAG AA passes).

Color values

HEX#40173A
RGBrgb(64, 23, 58)
HSLhsl(309, 47%, 17%)
HSVhsv(309, 64%, 25%)
CMYKcmyk(0%, 64.1%, 9.4%, 74.9%)
CIE-LABlab(15.53, 25.28, -13.33)
CIE-LCHlch(15.53, 28.58, 332.20°)
OKLaboklab(28.23% 0.0728 -0.0363)
OKLCHoklch(28.23% 0.081 333.5)
XYZxyz(3.1845, 2.0085, 4.2221)
Luminance0.0201 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40173A #17401D
analogous
#321740 #40173A #401726
triadic
#40173A #3A4017 #173A40
tetradic
#40173A #403217 #17401D #172640
square
#40173A #403217 #17401D #172640
split-complementary
#40173A #264017 #174032
monochromatic
#170814 #170814 #40173A #6D2763 #9A378C

Accessibility & contrast

On white

14.98
#40173A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40173A
14.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40173A#FFFFFF#000000##FFFFFF
##40173A1.0014.981.4014.98
#FFFFFF14.981.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF14.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#16233B
Deuteranopia (green-blind)
#232939
Tritanopia (blue-blind)
#431A26
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #40173a;
/* rgb */ color: rgb(64, 23, 58);
/* oklch */ color: oklch(28.2% 0.081 333.5);
Tailwind
colors: {
  custom: {
    50: '#765770',
    500: '#40173a',
    950: '#000000',
  },
}
SCSS
$custom: #40173a;
$custom-light: #765770;
$custom-dark: #000000;
JSON
{
  "hex": "#40173a",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 58
  },
  "hsl": {
    "h": 308.78,
    "s": 47.126,
    "l": 17.059
  },
  "oklch": {
    "l": 0.28231,
    "c": 0.08133,
    "h": 333.5
  },
  "luminance": 0.02008
}

Semantic roles & 50–950 ramp

primary
#40173A
secondary
#3C7745
accent
#D76551
background
#F7F5F6
surface
#EDE9EC
border
#C8C5C7
text
#090307
muted
#7B787A

Preview Lab

Preview with #40173A

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

Preview Lab → · Contrast checker → · Palette generator →

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