#40173E#40173E

#40173E is a dark, moderate purple. Relative luminance 0.021; OKLCH L 28.5% C 0.085 H 329.5°. Best body text is #FFFFFF at 14.89:1 contrast (WCAG AA passes).

Color values

HEX#40173E
RGBrgb(64, 23, 62)
HSLhsl(303, 47%, 17%)
HSVhsv(303, 64%, 25%)
CMYKcmyk(0%, 64.1%, 3.1%, 74.9%)
CIE-LABlab(15.75, 26.09, -15.80)
CIE-LCHlch(15.75, 30.51, 328.80°)
OKLaboklab(28.46% 0.0735 -0.0434)
OKLCHoklch(28.46% 0.085 329.5)
XYZxyz(3.2902, 2.0508, 4.7790)
Luminance0.0205 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40173E #174019
analogous
#2E1740 #40173E #40172A
triadic
#40173E #3E4017 #173E40
tetradic
#40173E #402E17 #174019 #172A40
square
#40173E #402E17 #174019 #172A40
split-complementary
#40173E #2A4017 #17402E
monochromatic
#170816 #170816 #40173E #6D276A #9A3795

Accessibility & contrast

On white

14.89
#40173E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40173E
14.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40173E#FFFFFF#000000##FFFFFF
##40173E1.0014.891.4114.89
#FFFFFF14.891.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#14243F
Deuteranopia (green-blind)
#21293D
Tritanopia (blue-blind)
#421B28
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #40173e;
/* rgb */ color: rgb(64, 23, 62);
/* oklch */ color: oklch(28.5% 0.085 329.5);
Tailwind
colors: {
  custom: {
    50: '#765773',
    500: '#40173e',
    950: '#000000',
  },
}
SCSS
$custom: #40173e;
$custom-light: #765773;
$custom-dark: #000000;
JSON
{
  "hex": "#40173e",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 62
  },
  "hsl": {
    "h": 302.927,
    "s": 47.126,
    "l": 17.059
  },
  "oklch": {
    "l": 0.28464,
    "c": 0.08535,
    "h": 329.5
  },
  "luminance": 0.02051
}

Semantic roles & 50–950 ramp

primary
#40173E
secondary
#3C773F
accent
#D75851
background
#F7F5F7
surface
#EDE9ED
border
#C8C5C8
text
#090308
muted
#7B787B

Preview Lab

Preview with #40173E

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

Preview Lab → · Contrast checker → · Palette generator →

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