#40186A#40186A

#40186A is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.9% C 0.134 H 301.3°. Best body text is #FFFFFF at 13.49:1 contrast (WCAG AA passes).

Color values

HEX#40186A
RGBrgb(64, 24, 106)
HSLhsl(269, 63%, 25%)
HSVhsv(269, 77%, 42%)
CMYKcmyk(39.6%, 77.4%, 0%, 58.4%)
CIE-LABlab(19.16, 36.33, -40.10)
CIE-LCHlch(19.16, 54.11, 312.18°)
OKLaboklab(31.94% 0.0695 -0.1144)
OKLCHoklch(31.94% 0.134 301.3)
XYZxyz(5.0419, 2.7838, 13.9046)
Luminance0.0278 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40186A #426A18
analogous
#18196A #40186A #69186A
triadic
#40186A #6A4018 #186A40
tetradic
#40186A #6A1819 #426A18 #186A69
square
#40186A #6A1819 #426A18 #186A69
split-complementary
#40186A #6A6918 #196A18
monochromatic
#0F0619 #220D38 #40186A #5E239C #7C2FCE

Accessibility & contrast

On white

13.49
#40186A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#40186A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40186A
13.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40186A#FFFFFF#000000##FFFFFF
##40186A1.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)
#002E6C
Deuteranopia (green-blind)
#002E68
Tritanopia (blue-blind)
#372D3F
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #40186a;
/* rgb */ color: rgb(64, 24, 106);
/* oklch */ color: oklch(31.9% 0.134 301.3);
Tailwind
colors: {
  custom: {
    50: '#795995',
    500: '#40186a',
    950: '#000000',
  },
}
SCSS
$custom: #40186a;
$custom-light: #795995;
$custom-dark: #000000;
JSON
{
  "hex": "#40186a",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 106
  },
  "hsl": {
    "h": 269.268,
    "s": 63.077,
    "l": 25.49
  },
  "oklch": {
    "l": 0.31935,
    "c": 0.13384,
    "h": 301.3
  },
  "luminance": 0.02784
}

Semantic roles & 50–950 ramp

primary
#40186A
secondary
#70A03E
accent
#E64296
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#09040D
muted
#7B797E

Preview Lab

Preview with #40186A

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

Preview Lab → · Contrast checker → · Palette generator →

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