#40174C#40174C

#40174C is a dark, moderate purple. Relative luminance 0.022; OKLCH L 29.4% C 0.101 H 317.8°. Best body text is #FFFFFF at 14.53:1 contrast (WCAG AA passes).

Color values

HEX#40174C
RGBrgb(64, 23, 76)
HSLhsl(286, 54%, 19%)
HSVhsv(286, 70%, 30%)
CMYKcmyk(15.8%, 69.7%, 0%, 70.2%)
CIE-LABlab(16.62, 29.21, -24.13)
CIE-LCHlch(16.62, 37.89, 320.44°)
OKLaboklab(29.38% 0.0746 -0.0675)
OKLCHoklch(29.38% 0.101 317.8)
XYZxyz(3.7251, 2.2247, 7.0693)
Luminance0.0222 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40174C #234C17
analogous
#26174C #40174C #4C173E
triadic
#40174C #4C4017 #174C40
tetradic
#40174C #4C2617 #234C17 #173E4C
square
#40174C #4C2617 #234C17 #173E4C
split-complementary
#40174C #3E4C17 #174C26
monochromatic
#140717 #18091D #40174C #68257B #8F33AA

Accessibility & contrast

On white

14.53
#40174C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#40174C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40174C
14.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40174C#FFFFFF#000000##FFFFFF
##40174C1.0014.531.4514.53
#FFFFFF14.531.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#07264E
Deuteranopia (green-blind)
#192A4B
Tritanopia (blue-blind)
#40202F
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #40174c;
/* rgb */ color: rgb(64, 23, 76);
/* oklch */ color: oklch(29.4% 0.101 317.8);
Tailwind
colors: {
  custom: {
    50: '#77577e',
    500: '#40174c',
    950: '#000000',
  },
}
SCSS
$custom: #40174c;
$custom-light: #77577e;
$custom-dark: #000000;
JSON
{
  "hex": "#40174c",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 76
  },
  "hsl": {
    "h": 286.415,
    "s": 53.535,
    "l": 19.412
  },
  "oklch": {
    "l": 0.29383,
    "c": 0.10059,
    "h": 317.8
  },
  "luminance": 0.02225
}

Semantic roles & 50–950 ramp

primary
#40174C
secondary
#4C833C
accent
#DD4B6C
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40174C

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

Preview Lab → · Contrast checker → · Palette generator →

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