#40176E#40176E

#40176E is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.2% C 0.140 H 299.8°. Best body text is #FFFFFF at 13.41:1 contrast (WCAG AA passes).

Color values

HEX#40176E
RGBrgb(64, 23, 110)
HSLhsl(268, 65%, 26%)
HSVhsv(268, 79%, 43%)
CMYKcmyk(41.8%, 79.1%, 0%, 56.9%)
CIE-LABlab(19.34, 37.89, -42.40)
CIE-LCHlch(19.34, 56.86, 311.78°)
OKLaboklab(32.18% 0.0695 -0.1211)
OKLCHoklch(32.18% 0.14 299.8)
XYZxyz(5.2345, 2.8285, 15.0190)
Luminance0.0283 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40176E #456E17
analogous
#17196E #40176E #6B176E
triadic
#40176E #6E4017 #176E40
tetradic
#40176E #6E1719 #456E17 #176E6B
square
#40176E #6E1719 #456E17 #176E6B
split-complementary
#40176E #6E6B17 #196E17
monochromatic
#0F0519 #230C3B #40176E #5D22A1 #7B2CD3

Accessibility & contrast

On white

13.41
#40176E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#40176E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40176E
13.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40176E#FFFFFF#000000##FFFFFF
##40176E1.0013.411.5713.41
#FFFFFF13.411.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F70
Deuteranopia (green-blind)
#002E6C
Tritanopia (blue-blind)
#352E41
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #40176e;
/* rgb */ color: rgb(64, 23, 110);
/* oklch */ color: oklch(32.2% 0.140 299.8);
Tailwind
colors: {
  custom: {
    50: '#7a5998',
    500: '#40176e',
    950: '#000000',
  },
}
SCSS
$custom: #40176e;
$custom-light: #7a5998;
$custom-dark: #000000;
JSON
{
  "hex": "#40176e",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 110
  },
  "hsl": {
    "h": 268.276,
    "s": 65.414,
    "l": 26.078
  },
  "oklch": {
    "l": 0.32178,
    "c": 0.13966,
    "h": 299.8
  },
  "luminance": 0.02829
}

Semantic roles & 50–950 ramp

primary
#40176E
secondary
#73A43D
accent
#E83F99
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040E
muted
#7C797E

Preview Lab

Preview with #40176E

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

Preview Lab → · Contrast checker → · Palette generator →

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