#40156C#40156C

#40156C is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.140 H 301.0°. Best body text is #FFFFFF at 13.62:1 contrast (WCAG AA passes).

Color values

HEX#40156C
RGBrgb(64, 21, 108)
HSLhsl(270, 67%, 25%)
HSVhsv(270, 81%, 42%)
CMYKcmyk(40.7%, 80.6%, 0%, 57.6%)
CIE-LABlab(18.84, 38.28, -41.92)
CIE-LCHlch(18.84, 56.77, 312.40°)
OKLaboklab(31.77% 0.0719 -0.1197)
OKLCHoklch(31.77% 0.14 301)
XYZxyz(5.0886, 2.7090, 14.4392)
Luminance0.0271 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40156C #416C15
analogous
#15166C #40156C #6B156C
triadic
#40156C #6C4015 #156C40
tetradic
#40156C #6C1516 #416C15 #156C6B
square
#40156C #6C1516 #416C15 #156C6B
split-complementary
#40156C #6C6B15 #166C15
monochromatic
#0F051A #220B39 #40156C #5E1F9F #7D29D2

Accessibility & contrast

On white

13.62
#40156C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40156C
13.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40156C#FFFFFF#000000##FFFFFF
##40156C1.0013.621.5413.62
#FFFFFF13.621.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.621.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40156c;
/* rgb */ color: rgb(64, 21, 108);
/* oklch */ color: oklch(31.8% 0.140 301.0);
Tailwind
colors: {
  custom: {
    50: '#7a5897',
    500: '#40156c',
    950: '#000000',
  },
}
SCSS
$custom: #40156c;
$custom-light: #7a5897;
$custom-dark: #000000;
JSON
{
  "hex": "#40156c",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 108
  },
  "hsl": {
    "h": 269.655,
    "s": 67.442,
    "l": 25.294
  },
  "oklch": {
    "l": 0.31767,
    "c": 0.13968,
    "h": 301
  },
  "luminance": 0.02709
}

Semantic roles & 50–950 ramp

primary
#40156C
secondary
#6FA33A
accent
#EA3D95
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030D
muted
#7C787E

Preview Lab

Preview with #40156C

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

Preview Lab → · Contrast checker → · Palette generator →

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