#40155E#40155E

#40155E is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.5% C 0.124 H 307.4°. Best body text is #FFFFFF at 14.12:1 contrast (WCAG AA passes).

Color values

HEX#40155E
RGBrgb(64, 21, 94)
HSLhsl(275, 63%, 23%)
HSVhsv(275, 78%, 37%)
CMYKcmyk(31.9%, 77.7%, 0%, 63.1%)
CIE-LABlab(17.62, 34.65, -34.69)
CIE-LCHlch(17.62, 49.03, 314.97°)
OKLaboklab(30.53% 0.0752 -0.0985)
OKLCHoklch(30.53% 0.124 307.4)
XYZxyz(4.4025, 2.4345, 10.8255)
Luminance0.0243 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40155E #335E15
analogous
#1B155E #40155E #5E1558
triadic
#40155E #5E4015 #155E40
tetradic
#40155E #5E1B15 #335E15 #15585E
square
#40155E #5E1B15 #335E15 #15585E
split-complementary
#40155E #585E15 #155E1B
monochromatic
#110619 #1E0A2C #40155E #622090 #842BC2

Accessibility & contrast

On white

14.12
#40155E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#40155E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40155E
14.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40155E#FFFFFF#000000##FFFFFF
##40155E1.0014.121.4914.12
#FFFFFF14.121.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A60
Deuteranopia (green-blind)
#002C5C
Tritanopia (blue-blind)
#3B2638
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #40155e;
/* rgb */ color: rgb(64, 21, 94);
/* oklch */ color: oklch(30.5% 0.124 307.4);
Tailwind
colors: {
  custom: {
    50: '#78578c',
    500: '#40155e',
    950: '#000000',
  },
}
SCSS
$custom: #40155e;
$custom-light: #78578c;
$custom-dark: #000000;
JSON
{
  "hex": "#40155e",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 94
  },
  "hsl": {
    "h": 275.342,
    "s": 63.478,
    "l": 22.549
  },
  "oklch": {
    "l": 0.30528,
    "c": 0.12392,
    "h": 307.4
  },
  "luminance": 0.02434
}

Semantic roles & 50–950 ramp

primary
#40155E
secondary
#5F9539
accent
#E74185
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40155E

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

Preview Lab → · Contrast checker → · Palette generator →

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