#40187A#40187A

#40187A is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.152 H 295.3°. Best body text is #FFFFFF at 12.89:1 contrast (WCAG AA passes).

Color values

HEX#40187A
RGBrgb(64, 24, 122)
HSLhsl(264, 67%, 29%)
HSVhsv(264, 80%, 48%)
CMYKcmyk(47.5%, 80.3%, 0%, 52.2%)
CIE-LABlab(20.63, 40.68, -48.02)
CIE-LCHlch(20.63, 62.94, 310.27°)
OKLaboklab(33.42% 0.0651 -0.1377)
OKLCHoklch(33.42% 0.152 295.3)
XYZxyz(5.9529, 3.1482, 18.7026)
Luminance0.0315 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40187A #527A18
analogous
#18217A #40187A #71187A
triadic
#40187A #7A4018 #187A40
tetradic
#40187A #7A1821 #527A18 #187A71
square
#40187A #7A1821 #527A18 #187A71
split-complementary
#40187A #7A7118 #217A18
monochromatic
#0D051A #250E47 #40187A #5B22AD #7735D7

Accessibility & contrast

On white

12.89
#40187A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40187A
12.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40187A#FFFFFF#000000##FFFFFF
##40187A1.0012.891.6312.89
#FFFFFF12.891.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327D
Deuteranopia (green-blind)
#003078
Tritanopia (blue-blind)
#2F3348
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40187a;
/* rgb */ color: rgb(64, 24, 122);
/* oklch */ color: oklch(33.4% 0.152 295.3);
Tailwind
colors: {
  custom: {
    50: '#7b5aa1',
    500: '#40187a',
    950: '#000000',
  },
}
SCSS
$custom: #40187a;
$custom-light: #7b5aa1;
$custom-dark: #000000;
JSON
{
  "hex": "#40187a",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 122
  },
  "hsl": {
    "h": 264.49,
    "s": 67.123,
    "l": 28.627
  },
  "oklch": {
    "l": 0.33423,
    "c": 0.15229,
    "h": 295.3
  },
  "luminance": 0.03148
}

Semantic roles & 50–950 ramp

primary
#40187A
secondary
#81AF3F
accent
#EA3EA4
background
#F7F5FA
surface
#EEE9F3
border
#C9C5CD
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40187A

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

Preview Lab → · Contrast checker → · Palette generator →

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