#40156A#40156A

#40156A is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.6% C 0.137 H 301.8°. Best body text is #FFFFFF at 13.70:1 contrast (WCAG AA passes).

Color values

HEX#40156A
RGBrgb(64, 21, 106)
HSLhsl(270, 67%, 25%)
HSVhsv(270, 80%, 42%)
CMYKcmyk(39.6%, 80.2%, 0%, 58.4%)
CIE-LABlab(18.66, 37.76, -40.91)
CIE-LCHlch(18.66, 55.67, 312.70°)
OKLaboklab(31.58% 0.0725 -0.1168)
OKLCHoklch(31.58% 0.137 301.8)
XYZxyz(4.9834, 2.6669, 13.8851)
Luminance0.0267 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40156A #3F6A15
analogous
#16156A #40156A #6A1569
triadic
#40156A #6A4015 #156A40
tetradic
#40156A #6A1615 #3F6A15 #15696A
square
#40156A #6A1615 #3F6A15 #15696A
split-complementary
#40156A #696A15 #156A16
monochromatic
#0F051A #210B37 #40156A #5F1F9D #7E29D0

Accessibility & contrast

On white

13.70
#40156A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#40156A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40156A
13.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40156A#FFFFFF#000000##FFFFFF
##40156A1.0013.701.5313.70
#FFFFFF13.701.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D6C
Deuteranopia (green-blind)
#002D68
Tritanopia (blue-blind)
#372B3F
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #40156a;
/* rgb */ color: rgb(64, 21, 106);
/* oklch */ color: oklch(31.6% 0.137 301.8);
Tailwind
colors: {
  custom: {
    50: '#7a5895',
    500: '#40156a',
    950: '#000000',
  },
}
SCSS
$custom: #40156a;
$custom-light: #7a5895;
$custom-dark: #000000;
JSON
{
  "hex": "#40156a",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 106
  },
  "hsl": {
    "h": 270.353,
    "s": 66.929,
    "l": 24.902
  },
  "oklch": {
    "l": 0.31584,
    "c": 0.13743,
    "h": 301.8
  },
  "luminance": 0.02667
}

Semantic roles & 50–950 ramp

primary
#40156A
secondary
#6DA13A
accent
#EA3E93
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030D
muted
#7C787E

Preview Lab

Preview with #40156A

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

Preview Lab → · Contrast checker → · Palette generator →

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