#40186F#40186F

#40186F is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.4% C 0.140 H 299.3°. Best body text is #FFFFFF at 13.31:1 contrast (WCAG AA passes).

Color values

HEX#40186F
RGBrgb(64, 24, 111)
HSLhsl(268, 64%, 26%)
HSVhsv(268, 78%, 44%)
CMYKcmyk(42.3%, 78.4%, 0%, 56.5%)
CIE-LABlab(19.60, 37.68, -42.63)
CIE-LCHlch(19.60, 56.89, 311.48°)
OKLaboklab(32.39% 0.0682 -0.1218)
OKLCHoklch(32.39% 0.14 299.3)
XYZxyz(5.3095, 2.8909, 15.3141)
Luminance0.0289 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40186F #476F18
analogous
#181C6F #40186F #6C186F
triadic
#40186F #6F4018 #186F40
tetradic
#40186F #6F181C #476F18 #186F6C
square
#40186F #6F181C #476F18 #186F6C
split-complementary
#40186F #6F6C18 #1C6F18
monochromatic
#0F0519 #230D3D #40186F #5D23A1 #7A2FD2

Accessibility & contrast

On white

13.31
#40186F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#40186F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40186F
13.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40186F#FFFFFF#000000##FFFFFF
##40186F1.0013.311.5813.31
#FFFFFF13.311.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F71
Deuteranopia (green-blind)
#002F6D
Tritanopia (blue-blind)
#352F42
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #40186f;
/* rgb */ color: rgb(64, 24, 111);
/* oklch */ color: oklch(32.4% 0.140 299.3);
Tailwind
colors: {
  custom: {
    50: '#7a5999',
    500: '#40186f',
    950: '#000000',
  },
}
SCSS
$custom: #40186f;
$custom-light: #7a5999;
$custom-dark: #000000;
JSON
{
  "hex": "#40186f",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 111
  },
  "hsl": {
    "h": 267.586,
    "s": 64.444,
    "l": 26.471
  },
  "oklch": {
    "l": 0.32387,
    "c": 0.13964,
    "h": 299.3
  },
  "luminance": 0.02891
}

Semantic roles & 50–950 ramp

primary
#40186F
secondary
#76A53E
accent
#E7409B
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040E
muted
#7C797E

Preview Lab

Preview with #40186F

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

Preview Lab → · Contrast checker → · Palette generator →

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