#40173C#40173C

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

Color values

HEX#40173C
RGBrgb(64, 23, 60)
HSLhsl(306, 47%, 17%)
HSVhsv(306, 64%, 25%)
CMYKcmyk(0%, 64.1%, 6.2%, 74.9%)
CIE-LABlab(15.64, 25.68, -14.57)
CIE-LCHlch(15.64, 29.53, 330.43°)
OKLaboklab(28.35% 0.0732 -0.0398)
OKLCHoklch(28.35% 0.083 331.4)
XYZxyz(3.2363, 2.0292, 4.4953)
Luminance0.0203 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40173C #17401B
analogous
#301740 #40173C #401728
triadic
#40173C #3C4017 #173C40
tetradic
#40173C #403017 #17401B #172840
square
#40173C #403017 #17401B #172840
split-complementary
#40173C #284017 #174030
monochromatic
#170815 #170815 #40173C #6D2766 #9A3790

Accessibility & contrast

On white

14.94
#40173C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.41
#40173C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40173C
14.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40173C#FFFFFF#000000##FFFFFF
##40173C1.0014.941.4114.94
#FFFFFF14.941.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#15233D
Deuteranopia (green-blind)
#22293B
Tritanopia (blue-blind)
#431A27
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #40173c;
/* rgb */ color: rgb(64, 23, 60);
/* oklch */ color: oklch(28.3% 0.083 331.4);
Tailwind
colors: {
  custom: {
    50: '#765772',
    500: '#40173c',
    950: '#000000',
  },
}
SCSS
$custom: #40173c;
$custom-light: #765772;
$custom-dark: #000000;
JSON
{
  "hex": "#40173c",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 60
  },
  "hsl": {
    "h": 305.854,
    "s": 47.126,
    "l": 17.059
  },
  "oklch": {
    "l": 0.28346,
    "c": 0.08331,
    "h": 331.4
  },
  "luminance": 0.02029
}

Semantic roles & 50–950 ramp

primary
#40173C
secondary
#3C7742
accent
#D75E51
background
#F7F5F6
surface
#EDE9EC
border
#C8C5C7
text
#090307
muted
#7B787A

Preview Lab

Preview with #40173C

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

Preview Lab → · Contrast checker → · Palette generator →

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