#40166D#40166D

#40166D is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.0% C 0.140 H 300.4°. Best body text is #FFFFFF at 13.52:1 contrast (WCAG AA passes).

Color values

HEX#40166D
RGBrgb(64, 22, 109)
HSLhsl(269, 66%, 26%)
HSVhsv(269, 80%, 43%)
CMYKcmyk(41.3%, 79.8%, 0%, 57.3%)
CIE-LABlab(19.09, 38.09, -42.17)
CIE-LCHlch(19.09, 56.82, 312.09°)
OKLaboklab(31.97% 0.0707 -0.1204)
OKLCHoklch(31.97% 0.14 300.4)
XYZxyz(5.1609, 2.7679, 14.7274)
Luminance0.0277 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40166D #436D16
analogous
#16176D #40166D #6B166D
triadic
#40166D #6D4016 #166D40
tetradic
#40166D #6D1617 #436D16 #166D6B
square
#40166D #6D1617 #436D16 #166D6B
split-complementary
#40166D #6D6B16 #176D16
monochromatic
#0F0519 #220C3A #40166D #5E20A0 #7C2BD3

Accessibility & contrast

On white

13.52
#40166D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#40166D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40166D
13.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40166D#FFFFFF#000000##FFFFFF
##40166D1.0013.521.5513.52
#FFFFFF13.521.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.521.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40166d;
/* rgb */ color: rgb(64, 22, 109);
/* oklch */ color: oklch(32.0% 0.140 300.4);
Tailwind
colors: {
  custom: {
    50: '#7a5898',
    500: '#40166d',
    950: '#000000',
  },
}
SCSS
$custom: #40166d;
$custom-light: #7a5898;
$custom-dark: #000000;
JSON
{
  "hex": "#40166d",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 109
  },
  "hsl": {
    "h": 268.966,
    "s": 66.412,
    "l": 25.686
  },
  "oklch": {
    "l": 0.31971,
    "c": 0.13967,
    "h": 300.4
  },
  "luminance": 0.02768
}

Semantic roles & 50–950 ramp

primary
#40166D
secondary
#71A33C
accent
#E93E97
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040E
muted
#7C797E

Preview Lab

Preview with #40166D

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

Preview Lab → · Contrast checker → · Palette generator →

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