#40186E#40186E

#40186E is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.3% C 0.138 H 299.6°. Best body text is #FFFFFF at 13.34:1 contrast (WCAG AA passes).

Color values

HEX#40186E
RGBrgb(64, 24, 110)
HSLhsl(268, 64%, 26%)
HSVhsv(268, 78%, 43%)
CMYKcmyk(41.8%, 78.2%, 0%, 56.9%)
CIE-LABlab(19.51, 37.41, -42.13)
CIE-LCHlch(19.51, 56.34, 311.61°)
OKLaboklab(32.3% 0.0685 -0.1203)
OKLCHoklch(32.3% 0.138 299.6)
XYZxyz(5.2548, 2.8690, 15.0258)
Luminance0.0287 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40186E #466E18
analogous
#181B6E #40186E #6B186E
triadic
#40186E #6E4018 #186E40
tetradic
#40186E #6E181B #466E18 #186E6B
square
#40186E #6E181B #466E18 #186E6B
split-complementary
#40186E #6E6B18 #1B6E18
monochromatic
#0F0519 #230D3C #40186E #5D23A0 #7B2FD2

Accessibility & contrast

On white

13.34
#40186E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40186E
13.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40186E#FFFFFF#000000##FFFFFF
##40186E1.0013.341.5713.34
#FFFFFF13.341.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F70
Deuteranopia (green-blind)
#002F6C
Tritanopia (blue-blind)
#352E42
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #40186e;
/* rgb */ color: rgb(64, 24, 110);
/* oklch */ color: oklch(32.3% 0.138 299.6);
Tailwind
colors: {
  custom: {
    50: '#7a5998',
    500: '#40186e',
    950: '#000000',
  },
}
SCSS
$custom: #40186e;
$custom-light: #7a5998;
$custom-dark: #000000;
JSON
{
  "hex": "#40186e",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 110
  },
  "hsl": {
    "h": 267.907,
    "s": 64.179,
    "l": 26.275
  },
  "oklch": {
    "l": 0.32296,
    "c": 0.13848,
    "h": 299.6
  },
  "luminance": 0.02869
}

Semantic roles & 50–950 ramp

primary
#40186E
secondary
#74A43E
accent
#E7419A
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040E
muted
#7C797E

Preview Lab

Preview with #40186E

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

Preview Lab → · Contrast checker → · Palette generator →

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