#40156E#40156E

#40156E is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.0% C 0.142 H 300.2°. Best body text is #FFFFFF at 13.54:1 contrast (WCAG AA passes).

Color values

HEX#40156E
RGBrgb(64, 21, 110)
HSLhsl(269, 68%, 26%)
HSVhsv(269, 81%, 43%)
CMYKcmyk(41.8%, 80.9%, 0%, 56.9%)
CIE-LABlab(19.02, 38.81, -42.92)
CIE-LCHlch(19.02, 57.87, 312.12°)
OKLaboklab(31.95% 0.0714 -0.1227)
OKLCHoklch(31.95% 0.142 300.2)
XYZxyz(5.1963, 2.7521, 15.0063)
Luminance0.0275 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40156E #436E15
analogous
#15166E #40156E #6C156E
triadic
#40156E #6E4015 #156E40
tetradic
#40156E #6E1516 #436E15 #156E6C
square
#40156E #6E1516 #436E15 #156E6C
split-complementary
#40156E #6E6C15 #166E15
monochromatic
#0F051A #220B3B #40156E #5E1FA1 #7C29D5

Accessibility & contrast

On white

13.54
#40156E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40156E
13.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40156E#FFFFFF#000000##FFFFFF
##40156E1.0013.541.5513.54
#FFFFFF13.541.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E70
Deuteranopia (green-blind)
#002E6C
Tritanopia (blue-blind)
#352D41
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #40156e;
/* rgb */ color: rgb(64, 21, 110);
/* oklch */ color: oklch(32.0% 0.142 300.2);
Tailwind
colors: {
  custom: {
    50: '#7a5898',
    500: '#40156e',
    950: '#000000',
  },
}
SCSS
$custom: #40156e;
$custom-light: #7a5898;
$custom-dark: #000000;
JSON
{
  "hex": "#40156e",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 110
  },
  "hsl": {
    "h": 268.989,
    "s": 67.939,
    "l": 25.686
  },
  "oklch": {
    "l": 0.31953,
    "c": 0.14192,
    "h": 300.2
  },
  "luminance": 0.02752
}

Semantic roles & 50–950 ramp

primary
#40156E
secondary
#71A43A
accent
#EB3D97
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030E
muted
#7C787E

Preview Lab

Preview with #40156E

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

Preview Lab → · Contrast checker → · Palette generator →

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