#40155B#40155B

#40155B is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.3% C 0.121 H 308.9°. Best body text is #FFFFFF at 14.22:1 contrast (WCAG AA passes).

Color values

HEX#40155B
RGBrgb(64, 21, 91)
HSLhsl(277, 63%, 22%)
HSVhsv(277, 77%, 36%)
CMYKcmyk(29.7%, 76.9%, 0%, 64.3%)
CIE-LABlab(17.37, 33.90, -33.08)
CIE-LCHlch(17.37, 47.36, 315.70°)
OKLaboklab(30.28% 0.0758 -0.0937)
OKLCHoklch(30.28% 0.121 308.9)
XYZxyz(4.2705, 2.3817, 10.1303)
Luminance0.0238 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40155B #305B15
analogous
#1D155B #40155B #5B1553
triadic
#40155B #5B4015 #155B40
tetradic
#40155B #5B1D15 #305B15 #15535B
square
#40155B #5B1D15 #305B15 #15535B
split-complementary
#40155B #535B15 #155B1D
monochromatic
#110619 #1D0A29 #40155B #63208D #862CBE

Accessibility & contrast

On white

14.22
#40155B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#40155B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40155B
14.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40155B#FFFFFF#000000##FFFFFF
##40155B1.0014.221.4814.22
#FFFFFF14.221.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00295D
Deuteranopia (green-blind)
#052B5A
Tritanopia (blue-blind)
#3C2536
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #40155b;
/* rgb */ color: rgb(64, 21, 91);
/* oklch */ color: oklch(30.3% 0.121 308.9);
Tailwind
colors: {
  custom: {
    50: '#78578a',
    500: '#40155b',
    950: '#000000',
  },
}
SCSS
$custom: #40155b;
$custom-light: #78578a;
$custom-dark: #000000;
JSON
{
  "hex": "#40155b",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 91
  },
  "hsl": {
    "h": 276.857,
    "s": 62.5,
    "l": 21.961
  },
  "oklch": {
    "l": 0.30277,
    "c": 0.12055,
    "h": 308.9
  },
  "luminance": 0.02382
}

Semantic roles & 50–950 ramp

primary
#40155B
secondary
#5C9239
accent
#E64281
background
#F7F5F8
surface
#EDE9F0
border
#C8C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40155B

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

Preview Lab → · Contrast checker → · Palette generator →

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