#40187D#40187D

#40187D is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.7% C 0.156 H 294.3°. Best body text is #FFFFFF at 12.77:1 contrast (WCAG AA passes).

Color values

HEX#40187D
RGBrgb(64, 24, 125)
HSLhsl(264, 68%, 29%)
HSVhsv(264, 81%, 49%)
CMYKcmyk(48.8%, 80.8%, 0%, 51%)
CIE-LABlab(20.92, 41.51, -49.46)
CIE-LCHlch(20.92, 64.57, 310.01°)
OKLaboklab(33.72% 0.0642 -0.1419)
OKLCHoklch(33.72% 0.156 294.3)
XYZxyz(6.1416, 3.2237, 19.6967)
Luminance0.0322 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40187D #557D18
analogous
#18237D #40187D #73187D
triadic
#40187D #7D4018 #187D40
tetradic
#40187D #7D1823 #557D18 #187D73
square
#40187D #7D1823 #557D18 #187D73
split-complementary
#40187D #7D7318 #237D18
monochromatic
#0D051A #260E4A #40187D #5A22B0 #7737D9

Accessibility & contrast

On white

12.77
#40187D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#40187D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40187D
12.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40187D#FFFFFF#000000##FFFFFF
##40187D1.0012.771.6412.77
#FFFFFF12.771.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003380
Deuteranopia (green-blind)
#00317B
Tritanopia (blue-blind)
#2E344A
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40187d;
/* rgb */ color: rgb(64, 24, 125);
/* oklch */ color: oklch(33.7% 0.156 294.3);
Tailwind
colors: {
  custom: {
    50: '#7c5aa4',
    500: '#40187d',
    950: '#000000',
  },
}
SCSS
$custom: #40187d;
$custom-light: #7c5aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#40187d",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 125
  },
  "hsl": {
    "h": 263.762,
    "s": 67.785,
    "l": 29.216
  },
  "oklch": {
    "l": 0.33715,
    "c": 0.15571,
    "h": 294.3
  },
  "luminance": 0.03224
}

Semantic roles & 50–950 ramp

primary
#40187D
secondary
#84B23F
accent
#EB3DA6
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40187D

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

Preview Lab → · Contrast checker → · Palette generator →

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