#40156F#40156F

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

Color values

HEX#40156F
RGBrgb(64, 21, 111)
HSLhsl(269, 68%, 26%)
HSVhsv(269, 81%, 44%)
CMYKcmyk(42.3%, 81.1%, 0%, 56.5%)
CIE-LABlab(19.12, 39.07, -43.42)
CIE-LCHlch(19.12, 58.41, 311.98°)
OKLaboklab(32.05% 0.0711 -0.1241)
OKLCHoklch(32.05% 0.143 299.8)
XYZxyz(5.2510, 2.7740, 15.2946)
Luminance0.0277 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40156F #446F15
analogous
#15176F #40156F #6D156F
triadic
#40156F #6F4015 #156F40
tetradic
#40156F #6F1517 #446F15 #156F6D
square
#40156F #6F1517 #446F15 #156F6D
split-complementary
#40156F #6F6D15 #176F15
monochromatic
#0F051A #220B3C #40156F #5E1FA2 #7B28D6

Accessibility & contrast

On white

13.51
#40156F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40156F
13.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40156F#FFFFFF#000000##FFFFFF
##40156F1.0013.511.5513.51
#FFFFFF13.511.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E71
Deuteranopia (green-blind)
#002E6D
Tritanopia (blue-blind)
#352D42
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #40156f;
/* rgb */ color: rgb(64, 21, 111);
/* oklch */ color: oklch(32.0% 0.143 299.8);
Tailwind
colors: {
  custom: {
    50: '#7a5899',
    500: '#40156f',
    950: '#000000',
  },
}
SCSS
$custom: #40156f;
$custom-light: #7a5899;
$custom-dark: #000000;
JSON
{
  "hex": "#40156f",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 111
  },
  "hsl": {
    "h": 268.667,
    "s": 68.182,
    "l": 25.882
  },
  "oklch": {
    "l": 0.32046,
    "c": 0.14304,
    "h": 299.8
  },
  "luminance": 0.02774
}

Semantic roles & 50–950 ramp

primary
#40156F
secondary
#72A53A
accent
#EB3D98
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A030E
muted
#7C787E

Preview Lab

Preview with #40156F

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

Preview Lab → · Contrast checker → · Palette generator →

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