#40186C#40186C

#40186C is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.1% C 0.136 H 300.4°. Best body text is #FFFFFF at 13.42:1 contrast (WCAG AA passes).

Color values

HEX#40186C
RGBrgb(64, 24, 108)
HSLhsl(269, 64%, 26%)
HSVhsv(269, 78%, 42%)
CMYKcmyk(40.7%, 77.8%, 0%, 57.6%)
CIE-LABlab(19.33, 36.87, -41.12)
CIE-LCHlch(19.33, 55.23, 311.88°)
OKLaboklab(32.12% 0.069 -0.1174)
OKLCHoklch(32.12% 0.136 300.4)
XYZxyz(5.1471, 2.8259, 14.4587)
Luminance0.0283 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40186C #446C18
analogous
#181A6C #40186C #6A186C
triadic
#40186C #6C4018 #186C40
tetradic
#40186C #6C181A #446C18 #186C6A
square
#40186C #6C181A #446C18 #186C6A
split-complementary
#40186C #6C6A18 #1A6C18
monochromatic
#0F0619 #220D3A #40186C #5E239E #7B2ED0

Accessibility & contrast

On white

13.42
#40186C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40186C
13.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40186C#FFFFFF#000000##FFFFFF
##40186C1.0013.421.5713.42
#FFFFFF13.421.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F6E
Deuteranopia (green-blind)
#002E6A
Tritanopia (blue-blind)
#362D41
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #40186c;
/* rgb */ color: rgb(64, 24, 108);
/* oklch */ color: oklch(32.1% 0.136 300.4);
Tailwind
colors: {
  custom: {
    50: '#7a5997',
    500: '#40186c',
    950: '#000000',
  },
}
SCSS
$custom: #40186c;
$custom-light: #7a5997;
$custom-dark: #000000;
JSON
{
  "hex": "#40186c",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 108
  },
  "hsl": {
    "h": 268.571,
    "s": 63.636,
    "l": 25.882
  },
  "oklch": {
    "l": 0.32115,
    "c": 0.13617,
    "h": 300.4
  },
  "luminance": 0.02826
}

Semantic roles & 50–950 ramp

primary
#40186C
secondary
#72A23E
accent
#E74198
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040D
muted
#7C797E

Preview Lab

Preview with #40186C

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

Preview Lab → · Contrast checker → · Palette generator →

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