#40155D#40155D

#40155D is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.4% C 0.123 H 307.9°. Best body text is #FFFFFF at 14.16:1 contrast (WCAG AA passes).

Color values

HEX#40155D
RGBrgb(64, 21, 93)
HSLhsl(276, 63%, 22%)
HSVhsv(276, 77%, 36%)
CMYKcmyk(31.2%, 77.4%, 0%, 63.5%)
CIE-LABlab(17.54, 34.40, -34.15)
CIE-LCHlch(17.54, 48.47, 315.20°)
OKLaboklab(30.44% 0.0754 -0.0969)
OKLCHoklch(30.44% 0.123 307.9)
XYZxyz(4.3579, 2.4167, 10.5907)
Luminance0.0242 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40155D #325D15
analogous
#1C155D #40155D #5D1556
triadic
#40155D #5D4015 #155D40
tetradic
#40155D #5D1C15 #325D15 #15565D
square
#40155D #5D1C15 #325D15 #15565D
split-complementary
#40155D #565D15 #155D1C
monochromatic
#110619 #1E0A2B #40155D #62208F #852CC1

Accessibility & contrast

On white

14.16
#40155D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40155D
14.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40155D#FFFFFF#000000##FFFFFF
##40155D1.0014.161.4814.16
#FFFFFF14.161.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00295F
Deuteranopia (green-blind)
#012B5B
Tritanopia (blue-blind)
#3B2637
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #40155d;
/* rgb */ color: rgb(64, 21, 93);
/* oklch */ color: oklch(30.4% 0.123 307.9);
Tailwind
colors: {
  custom: {
    50: '#78578b',
    500: '#40155d',
    950: '#000000',
  },
}
SCSS
$custom: #40155d;
$custom-light: #78578b;
$custom-dark: #000000;
JSON
{
  "hex": "#40155d",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 93
  },
  "hsl": {
    "h": 275.833,
    "s": 63.158,
    "l": 22.353
  },
  "oklch": {
    "l": 0.30444,
    "c": 0.1228,
    "h": 307.9
  },
  "luminance": 0.02417
}

Semantic roles & 50–950 ramp

primary
#40155D
secondary
#5E9439
accent
#E64284
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40155D

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

Preview Lab → · Contrast checker → · Palette generator →

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