#40186D#40186D

#40186D is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.2% C 0.137 H 300.0°. Best body text is #FFFFFF at 13.38:1 contrast (WCAG AA passes).

Color values

HEX#40186D
RGBrgb(64, 24, 109)
HSLhsl(268, 64%, 26%)
HSVhsv(268, 78%, 43%)
CMYKcmyk(41.3%, 78%, 0%, 57.3%)
CIE-LABlab(19.42, 37.14, -41.62)
CIE-LCHlch(19.42, 55.78, 311.74°)
OKLaboklab(32.21% 0.0688 -0.1189)
OKLCHoklch(32.21% 0.137 300)
XYZxyz(5.2006, 2.8473, 14.7406)
Luminance0.0285 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40186D #456D18
analogous
#181A6D #40186D #6A186D
triadic
#40186D #6D4018 #186D40
tetradic
#40186D #6D181A #456D18 #186D6A
square
#40186D #6D181A #456D18 #186D6A
split-complementary
#40186D #6D6A18 #1A6D18
monochromatic
#0F0619 #230D3B #40186D #5D239F #7B2ED1

Accessibility & contrast

On white

13.38
#40186D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#40186D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40186D
13.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40186D#FFFFFF#000000##FFFFFF
##40186D1.0013.381.5713.38
#FFFFFF13.381.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F6F
Deuteranopia (green-blind)
#002E6B
Tritanopia (blue-blind)
#362E41
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #40186d;
/* rgb */ color: rgb(64, 24, 109);
/* oklch */ color: oklch(32.2% 0.137 300.0);
Tailwind
colors: {
  custom: {
    50: '#7a5998',
    500: '#40186d',
    950: '#000000',
  },
}
SCSS
$custom: #40186d;
$custom-light: #7a5998;
$custom-dark: #000000;
JSON
{
  "hex": "#40186d",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 109
  },
  "hsl": {
    "h": 268.235,
    "s": 63.91,
    "l": 26.078
  },
  "oklch": {
    "l": 0.32205,
    "c": 0.13732,
    "h": 300
  },
  "luminance": 0.02847
}

Semantic roles & 50–950 ramp

primary
#40186D
secondary
#73A33E
accent
#E74199
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040E
muted
#7C797E

Preview Lab

Preview with #40186D

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

Preview Lab → · Contrast checker → · Palette generator →

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