#40187B#40187B

#40187B is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.5% C 0.153 H 295.0°. Best body text is #FFFFFF at 12.85:1 contrast (WCAG AA passes).

Color values

HEX#40187B
RGBrgb(64, 24, 123)
HSLhsl(264, 67%, 29%)
HSVhsv(264, 80%, 48%)
CMYKcmyk(48%, 80.5%, 0%, 51.8%)
CIE-LABlab(20.72, 40.96, -48.50)
CIE-LCHlch(20.72, 63.48, 310.18°)
OKLaboklab(33.52% 0.0648 -0.1391)
OKLCHoklch(33.52% 0.153 295)
XYZxyz(6.0152, 3.1732, 19.0306)
Luminance0.0317 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40187B #537B18
analogous
#18227B #40187B #72187B
triadic
#40187B #7B4018 #187B40
tetradic
#40187B #7B1822 #537B18 #187B72
square
#40187B #7B1822 #537B18 #187B72
split-complementary
#40187B #7B7218 #227B18
monochromatic
#0D051A #250E48 #40187B #5B22AE #7736D8

Accessibility & contrast

On white

12.85
#40187B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#40187B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40187B
12.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40187B#FFFFFF#000000##FFFFFF
##40187B1.0012.851.6312.85
#FFFFFF12.851.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337E
Deuteranopia (green-blind)
#003079
Tritanopia (blue-blind)
#2F3349
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40187b;
/* rgb */ color: rgb(64, 24, 123);
/* oklch */ color: oklch(33.5% 0.153 295.0);
Tailwind
colors: {
  custom: {
    50: '#7c5aa2',
    500: '#40187b',
    950: '#000000',
  },
}
SCSS
$custom: #40187b;
$custom-light: #7c5aa2;
$custom-dark: #000000;
JSON
{
  "hex": "#40187b",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 123
  },
  "hsl": {
    "h": 264.242,
    "s": 67.347,
    "l": 28.824
  },
  "oklch": {
    "l": 0.3352,
    "c": 0.15343,
    "h": 295
  },
  "luminance": 0.03173
}

Semantic roles & 50–950 ramp

primary
#40187B
secondary
#82B03F
accent
#EA3EA4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40187B

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

Preview Lab → · Contrast checker → · Palette generator →

#40187B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva