#40108D#40108D

#40108D is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.6% C 0.180 H 290.6°. Best body text is #FFFFFF at 12.52:1 contrast (WCAG AA passes).

Color values

HEX#40108D
RGBrgb(64, 16, 141)
HSLhsl(263, 80%, 31%)
HSVhsv(263, 89%, 55%)
CMYKcmyk(54.6%, 88.7%, 0%, 44.7%)
CIE-LABlab(21.52, 48.92, -58.55)
CIE-LCHlch(21.52, 76.30, 309.88°)
OKLaboklab(34.63% 0.0634 -0.1684)
OKLCHoklch(34.63% 0.18 290.6)
XYZxyz(7.1060, 3.3833, 25.4728)
Luminance0.0338 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40108D #5D8D10
analogous
#101E8D #40108D #7E108D
triadic
#40108D #8D4010 #108D40
tetradic
#40108D #8D101E #5D8D10 #108D7E
square
#40108D #8D101E #5D8D10 #108D7E
split-complementary
#40108D #8D7E10 #1E8D10
monochromatic
#0E041F #270A56 #40108D #5916C4 #7630E7

Accessibility & contrast

On white

12.52
#40108D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#40108D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40108D
12.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40108D#FFFFFF#000000##FFFFFF
##40108D1.0012.521.6812.52
#FFFFFF12.521.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003690
Deuteranopia (green-blind)
#00318B
Tritanopia (blue-blind)
#223852
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #40108d;
/* rgb */ color: rgb(64, 16, 141);
/* oklch */ color: oklch(34.6% 0.180 290.6);
Tailwind
colors: {
  custom: {
    50: '#7f58b0',
    500: '#40108d',
    950: '#000000',
  },
}
SCSS
$custom: #40108d;
$custom-light: #7f58b0;
$custom-dark: #000000;
JSON
{
  "hex": "#40108d",
  "rgb": {
    "r": 64,
    "g": 16,
    "b": 141
  },
  "hsl": {
    "h": 263.04,
    "s": 79.618,
    "l": 30.784
  },
  "oklch": {
    "l": 0.34627,
    "c": 0.17991,
    "h": 290.6
  },
  "luminance": 0.03384
}

Semantic roles & 50–950 ramp

primary
#40108D
secondary
#8CC237
accent
#F632AB
background
#F8F5FA
surface
#EFE9F5
border
#CAC5CF
text
#0B0411
muted
#7C7980

Preview Lab

Preview with #40108D

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

Preview Lab → · Contrast checker → · Palette generator →

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