#40176A#40176A

#40176A is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.135 H 301.5°. Best body text is #FFFFFF at 13.56:1 contrast (WCAG AA passes).

Color values

HEX#40176A
RGBrgb(64, 23, 106)
HSLhsl(270, 64%, 25%)
HSVhsv(270, 78%, 42%)
CMYKcmyk(39.6%, 78.3%, 0%, 58.4%)
CIE-LABlab(18.99, 36.82, -40.38)
CIE-LCHlch(18.99, 54.64, 312.36°)
OKLaboklab(31.81% 0.0705 -0.1152)
OKLCHoklch(31.81% 0.135 301.5)
XYZxyz(5.0216, 2.7434, 13.8978)
Luminance0.0274 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40176A #416A17
analogous
#17176A #40176A #6A176A
triadic
#40176A #6A4017 #176A40
tetradic
#40176A #6A1717 #416A17 #176A6A
square
#40176A #6A1717 #416A17 #176A6A
split-complementary
#40176A #6A6A17 #176A17
monochromatic
#0F0519 #220C38 #40176A #5E229C #7D2DCF

Accessibility & contrast

On white

13.56
#40176A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#40176A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40176A
13.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40176A#FFFFFF#000000##FFFFFF
##40176A1.0013.561.5513.56
#FFFFFF13.561.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E6C
Deuteranopia (green-blind)
#002E68
Tritanopia (blue-blind)
#372C3F
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #40176a;
/* rgb */ color: rgb(64, 23, 106);
/* oklch */ color: oklch(31.8% 0.135 301.5);
Tailwind
colors: {
  custom: {
    50: '#795995',
    500: '#40176a',
    950: '#000000',
  },
}
SCSS
$custom: #40176a;
$custom-light: #795995;
$custom-dark: #000000;
JSON
{
  "hex": "#40176a",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 106
  },
  "hsl": {
    "h": 269.639,
    "s": 64.341,
    "l": 25.294
  },
  "oklch": {
    "l": 0.31814,
    "c": 0.13507,
    "h": 301.5
  },
  "luminance": 0.02743
}

Semantic roles & 50–950 ramp

primary
#40176A
secondary
#6FA03D
accent
#E74095
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040D
muted
#7C797E

Preview Lab

Preview with #40176A

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

Preview Lab → · Contrast checker → · Palette generator →

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