#40174F#40174F

#40174F is a dark, moderate purple. Relative luminance 0.023; OKLCH L 29.6% C 0.104 H 315.8°. Best body text is #FFFFFF at 14.45:1 contrast (WCAG AA passes).

Color values

HEX#40174F
RGBrgb(64, 23, 79)
HSLhsl(284, 55%, 20%)
HSVhsv(284, 71%, 31%)
CMYKcmyk(19%, 70.9%, 0%, 69%)
CIE-LABlab(16.83, 29.93, -25.85)
CIE-LCHlch(16.83, 39.55, 319.18°)
OKLaboklab(29.6% 0.0745 -0.0726)
OKLCHoklch(29.6% 0.104 315.8)
XYZxyz(3.8318, 2.2674, 7.6314)
Luminance0.0227 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40174F #264F17
analogous
#24174F #40174F #4F1742
triadic
#40174F #4F4017 #174F40
tetradic
#40174F #4F2417 #264F17 #17424F
square
#40174F #4F2417 #264F17 #17424F
split-complementary
#40174F #424F17 #174F24
monochromatic
#130718 #1A0920 #40174F #66257E #8D33AE

Accessibility & contrast

On white

14.45
#40174F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40174F
14.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40174F#FFFFFF#000000##FFFFFF
##40174F1.0014.451.4514.45
#FFFFFF14.451.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#032751
Deuteranopia (green-blind)
#172B4E
Tritanopia (blue-blind)
#3F2130
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #40174f;
/* rgb */ color: rgb(64, 23, 79);
/* oklch */ color: oklch(29.6% 0.104 315.8);
Tailwind
colors: {
  custom: {
    50: '#775781',
    500: '#40174f',
    950: '#000000',
  },
}
SCSS
$custom: #40174f;
$custom-light: #775781;
$custom-dark: #000000;
JSON
{
  "hex": "#40174f",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 79
  },
  "hsl": {
    "h": 283.929,
    "s": 54.902,
    "l": 20
  },
  "oklch": {
    "l": 0.296,
    "c": 0.104,
    "h": 315.8
  },
  "luminance": 0.02267
}

Semantic roles & 50–950 ramp

primary
#40174F
secondary
#50863C
accent
#DE4A71
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40174F

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

Preview Lab → · Contrast checker → · Palette generator →

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