#40176C#40176C

#40176C is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.0% C 0.137 H 300.6°. Best body text is #FFFFFF at 13.49:1 contrast (WCAG AA passes).

Color values

HEX#40176C
RGBrgb(64, 23, 108)
HSLhsl(269, 65%, 26%)
HSVhsv(269, 79%, 42%)
CMYKcmyk(40.7%, 78.7%, 0%, 57.6%)
CIE-LABlab(19.16, 37.35, -41.39)
CIE-LCHlch(19.16, 55.76, 312.06°)
OKLaboklab(32% 0.07 -0.1182)
OKLCHoklch(32% 0.137 300.6)
XYZxyz(5.1269, 2.7854, 14.4520)
Luminance0.0278 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40176C #436C17
analogous
#17196C #40176C #6A176C
triadic
#40176C #6C4017 #176C40
tetradic
#40176C #6C1719 #436C17 #176C6A
square
#40176C #6C1719 #436C17 #176C6A
split-complementary
#40176C #6C6A17 #196C17
monochromatic
#0F0519 #220C3A #40176C #5E229E #7C2CD1

Accessibility & contrast

On white

13.49
#40176C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40176C
13.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40176C#FFFFFF#000000##FFFFFF
##40176C1.0013.491.5613.49
#FFFFFF13.491.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E6E
Deuteranopia (green-blind)
#002E6A
Tritanopia (blue-blind)
#362D40
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #40176c;
/* rgb */ color: rgb(64, 23, 108);
/* oklch */ color: oklch(32.0% 0.137 300.6);
Tailwind
colors: {
  custom: {
    50: '#7a5997',
    500: '#40176c',
    950: '#000000',
  },
}
SCSS
$custom: #40176c;
$custom-light: #7a5997;
$custom-dark: #000000;
JSON
{
  "hex": "#40176c",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 108
  },
  "hsl": {
    "h": 268.941,
    "s": 64.885,
    "l": 25.686
  },
  "oklch": {
    "l": 0.31995,
    "c": 0.13736,
    "h": 300.6
  },
  "luminance": 0.02785
}

Semantic roles & 50–950 ramp

primary
#40176C
secondary
#71A23D
accent
#E84097
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040D
muted
#7C797E

Preview Lab

Preview with #40176C

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

Preview Lab → · Contrast checker → · Palette generator →

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