#40156D#40156D

#40156D is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.9% C 0.141 H 300.6°. Best body text is #FFFFFF at 13.58:1 contrast (WCAG AA passes).

Color values

HEX#40156D
RGBrgb(64, 21, 109)
HSLhsl(269, 68%, 25%)
HSVhsv(269, 81%, 43%)
CMYKcmyk(41.3%, 80.7%, 0%, 57.3%)
CIE-LABlab(18.93, 38.55, -42.43)
CIE-LCHlch(18.93, 57.32, 312.26°)
OKLaboklab(31.86% 0.0716 -0.1212)
OKLCHoklch(31.86% 0.141 300.6)
XYZxyz(5.1422, 2.7304, 14.7211)
Luminance0.0273 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40156D #426D15
analogous
#15166D #40156D #6C156D
triadic
#40156D #6D4015 #156D40
tetradic
#40156D #6D1516 #426D15 #156D6C
square
#40156D #6D1516 #426D15 #156D6C
split-complementary
#40156D #6D6C15 #166D15
monochromatic
#0F051A #220B3A #40156D #5E1FA0 #7C29D4

Accessibility & contrast

On white

13.58
#40156D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#40156D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40156D
13.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40156D#FFFFFF#000000##FFFFFF
##40156D1.0013.581.5513.58
#FFFFFF13.581.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E6F
Deuteranopia (green-blind)
#002D6B
Tritanopia (blue-blind)
#362C40
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #40156d;
/* rgb */ color: rgb(64, 21, 109);
/* oklch */ color: oklch(31.9% 0.141 300.6);
Tailwind
colors: {
  custom: {
    50: '#7a5898',
    500: '#40156d',
    950: '#000000',
  },
}
SCSS
$custom: #40156d;
$custom-light: #7a5898;
$custom-dark: #000000;
JSON
{
  "hex": "#40156d",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 109
  },
  "hsl": {
    "h": 269.318,
    "s": 67.692,
    "l": 25.49
  },
  "oklch": {
    "l": 0.3186,
    "c": 0.1408,
    "h": 300.6
  },
  "luminance": 0.0273
}

Semantic roles & 50–950 ramp

primary
#40156D
secondary
#70A33A
accent
#EB3D96
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030E
muted
#7C787E

Preview Lab

Preview with #40156D

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

Preview Lab → · Contrast checker → · Palette generator →

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