#40188D#40188D

#40188D is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.3% C 0.174 H 289.8°. Best body text is #FFFFFF at 12.12:1 contrast (WCAG AA passes).

Color values

HEX#40188D
RGBrgb(64, 24, 141)
HSLhsl(261, 71%, 32%)
HSVhsv(261, 83%, 55%)
CMYKcmyk(54.6%, 83%, 0%, 44.7%)
CIE-LABlab(22.54, 45.92, -56.87)
CIE-LCHlch(22.54, 73.10, 308.92°)
OKLaboklab(35.33% 0.0588 -0.1636)
OKLCHoklch(35.33% 0.174 289.8)
XYZxyz(7.2473, 3.6660, 25.5199)
Luminance0.0367 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40188D #658D18
analogous
#182A8D #40188D #7B188D
triadic
#40188D #8D4018 #188D40
tetradic
#40188D #8D182A #658D18 #188D7B
square
#40188D #8D182A #658D18 #188D7B
split-complementary
#40188D #8D7B18 #2A8D18
monochromatic
#110624 #280F59 #40188D #5821C1 #7741DF

Accessibility & contrast

On white

12.12
#40188D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#40188D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40188D
12.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40188D#FFFFFF#000000##FFFFFF
##40188D1.0012.121.7312.12
#FFFFFF12.121.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003890
Deuteranopia (green-blind)
#00338B
Tritanopia (blue-blind)
#223B53
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40188d;
/* rgb */ color: rgb(64, 24, 141);
/* oklch */ color: oklch(35.3% 0.174 289.8);
Tailwind
colors: {
  custom: {
    50: '#7e5baf',
    500: '#40188d',
    950: '#000000',
  },
}
SCSS
$custom: #40188d;
$custom-light: #7e5baf;
$custom-dark: #000000;
JSON
{
  "hex": "#40188d",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 141
  },
  "hsl": {
    "h": 260.513,
    "s": 70.909,
    "l": 32.353
  },
  "oklch": {
    "l": 0.35325,
    "c": 0.1738,
    "h": 289.8
  },
  "luminance": 0.03666
}

Semantic roles & 50–950 ramp

primary
#40188D
secondary
#94BF42
accent
#EE3AB0
background
#F8F5FA
surface
#EFE9F5
border
#CAC5CF
text
#0B0411
muted
#7C7980

Preview Lab

Preview with #40188D

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

Preview Lab → · Contrast checker → · Palette generator →

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