#40176D#40176D

#40176D is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.1% C 0.139 H 300.2°. Best body text is #FFFFFF at 13.45:1 contrast (WCAG AA passes).

Color values

HEX#40176D
RGBrgb(64, 23, 109)
HSLhsl(269, 65%, 26%)
HSVhsv(269, 79%, 43%)
CMYKcmyk(41.3%, 78.9%, 0%, 57.3%)
CIE-LABlab(19.25, 37.62, -41.90)
CIE-LCHlch(19.25, 56.31, 311.92°)
OKLaboklab(32.09% 0.0697 -0.1197)
OKLCHoklch(32.09% 0.139 300.2)
XYZxyz(5.1804, 2.8069, 14.7339)
Luminance0.0281 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40176D #446D17
analogous
#17196D #40176D #6B176D
triadic
#40176D #6D4017 #176D40
tetradic
#40176D #6D1719 #446D17 #176D6B
square
#40176D #6D1719 #446D17 #176D6B
split-complementary
#40176D #6D6B17 #196D17
monochromatic
#0F0519 #220C3A #40176D #5E22A0 #7B2CD2

Accessibility & contrast

On white

13.45
#40176D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#40176D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40176D
13.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40176D#FFFFFF#000000##FFFFFF
##40176D1.0013.451.5613.45
#FFFFFF13.451.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E6F
Deuteranopia (green-blind)
#002E6B
Tritanopia (blue-blind)
#362D41
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #40176d;
/* rgb */ color: rgb(64, 23, 109);
/* oklch */ color: oklch(32.1% 0.139 300.2);
Tailwind
colors: {
  custom: {
    50: '#7a5998',
    500: '#40176d',
    950: '#000000',
  },
}
SCSS
$custom: #40176d;
$custom-light: #7a5998;
$custom-dark: #000000;
JSON
{
  "hex": "#40176d",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 109
  },
  "hsl": {
    "h": 268.605,
    "s": 65.152,
    "l": 25.882
  },
  "oklch": {
    "l": 0.32086,
    "c": 0.13852,
    "h": 300.2
  },
  "luminance": 0.02807
}

Semantic roles & 50–950 ramp

primary
#40176D
secondary
#72A33D
accent
#E84098
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040E
muted
#7C797E

Preview Lab

Preview with #40176D

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

Preview Lab → · Contrast checker → · Palette generator →

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