#40156B#40156B

#40156B is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.7% C 0.139 H 301.4°. Best body text is #FFFFFF at 13.66:1 contrast (WCAG AA passes).

Color values

HEX#40156B
RGBrgb(64, 21, 107)
HSLhsl(270, 67%, 25%)
HSVhsv(270, 80%, 42%)
CMYKcmyk(40.2%, 80.4%, 0%, 58%)
CIE-LABlab(18.75, 38.02, -41.42)
CIE-LCHlch(18.75, 56.22, 312.55°)
OKLaboklab(31.67% 0.0722 -0.1183)
OKLCHoklch(31.67% 0.139 301.4)
XYZxyz(5.0357, 2.6878, 14.1606)
Luminance0.0269 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40156B #406B15
analogous
#15156B #40156B #6B156B
triadic
#40156B #6B4015 #156B40
tetradic
#40156B #6B1515 #406B15 #156B6B
square
#40156B #6B1515 #406B15 #156B6B
split-complementary
#40156B #6B6B15 #156B15
monochromatic
#0F051A #210B38 #40156B #5F1F9E #7D29D1

Accessibility & contrast

On white

13.66
#40156B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#40156B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40156B
13.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40156B#FFFFFF#000000##FFFFFF
##40156B1.0013.661.5413.66
#FFFFFF13.661.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D6D
Deuteranopia (green-blind)
#002D69
Tritanopia (blue-blind)
#362B3F
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #40156b;
/* rgb */ color: rgb(64, 21, 107);
/* oklch */ color: oklch(31.7% 0.139 301.4);
Tailwind
colors: {
  custom: {
    50: '#7a5896',
    500: '#40156b',
    950: '#000000',
  },
}
SCSS
$custom: #40156b;
$custom-light: #7a5896;
$custom-dark: #000000;
JSON
{
  "hex": "#40156b",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 107
  },
  "hsl": {
    "h": 270,
    "s": 67.188,
    "l": 25.098
  },
  "oklch": {
    "l": 0.31675,
    "c": 0.13856,
    "h": 301.4
  },
  "luminance": 0.02688
}

Semantic roles & 50–950 ramp

primary
#40156B
secondary
#6EA23A
accent
#EA3E94
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030D
muted
#7C787E

Preview Lab

Preview with #40156B

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

Preview Lab → · Contrast checker → · Palette generator →

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