#40166A#40166A

#40166A is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.7% C 0.136 H 301.6°. Best body text is #FFFFFF at 13.63:1 contrast (WCAG AA passes).

Color values

HEX#40166A
RGBrgb(64, 22, 106)
HSLhsl(270, 66%, 25%)
HSVhsv(270, 79%, 42%)
CMYKcmyk(39.6%, 79.2%, 0%, 58.4%)
CIE-LABlab(18.82, 37.29, -40.65)
CIE-LCHlch(18.82, 55.16, 312.53°)
OKLaboklab(31.7% 0.0715 -0.116)
OKLCHoklch(31.7% 0.136 301.6)
XYZxyz(5.0021, 2.7044, 13.8913)
Luminance0.0270 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40166A #406A16
analogous
#16166A #40166A #6A166A
triadic
#40166A #6A4016 #166A40
tetradic
#40166A #6A1616 #406A16 #166A6A
square
#40166A #6A1616 #406A16 #166A6A
split-complementary
#40166A #6A6A16 #166A16
monochromatic
#0F0519 #210B37 #40166A #5F219D #7D2BCF

Accessibility & contrast

On white

13.63
#40166A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#40166A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40166A
13.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40166A#FFFFFF#000000##FFFFFF
##40166A1.0013.631.5413.63
#FFFFFF13.631.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.631.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40166a;
/* rgb */ color: rgb(64, 22, 106);
/* oklch */ color: oklch(31.7% 0.136 301.6);
Tailwind
colors: {
  custom: {
    50: '#795895',
    500: '#40166a',
    950: '#000000',
  },
}
SCSS
$custom: #40166a;
$custom-light: #795895;
$custom-dark: #000000;
JSON
{
  "hex": "#40166a",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 106
  },
  "hsl": {
    "h": 270,
    "s": 65.625,
    "l": 25.098
  },
  "oklch": {
    "l": 0.31697,
    "c": 0.13627,
    "h": 301.6
  },
  "luminance": 0.02704
}

Semantic roles & 50–950 ramp

primary
#40166A
secondary
#6EA03B
accent
#E93F94
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030D
muted
#7C787E

Preview Lab

Preview with #40166A

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

Preview Lab → · Contrast checker → · Palette generator →

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