#40145E#40145E

#40145E is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.4% C 0.125 H 307.6°. Best body text is #FFFFFF at 14.19:1 contrast (WCAG AA passes).

Color values

HEX#40145E
RGBrgb(64, 20, 94)
HSLhsl(276, 65%, 22%)
HSVhsv(276, 79%, 37%)
CMYKcmyk(31.9%, 78.7%, 0%, 63.1%)
CIE-LABlab(17.45, 35.13, -34.96)
CIE-LCHlch(17.45, 49.56, 315.14°)
OKLaboklab(30.41% 0.0763 -0.0993)
OKLCHoklch(30.41% 0.125 307.6)
XYZxyz(4.3845, 2.3985, 10.8195)
Luminance0.0240 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40145E #325E14
analogous
#1B145E #40145E #5E1457
triadic
#40145E #5E4014 #145E40
tetradic
#40145E #5E1B14 #325E14 #14575E
square
#40145E #5E1B14 #325E14 #14575E
split-complementary
#40145E #575E14 #145E1B
monochromatic
#110519 #1E092C #40145E #621F90 #8529C3

Accessibility & contrast

On white

14.19
#40145E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#40145E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40145E
14.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40145E#FFFFFF#000000##FFFFFF
##40145E1.0014.191.4814.19
#FFFFFF14.191.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.191.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40145e;
/* rgb */ color: rgb(64, 20, 94);
/* oklch */ color: oklch(30.4% 0.125 307.6);
Tailwind
colors: {
  custom: {
    50: '#78568c',
    500: '#40145e',
    950: '#000000',
  },
}
SCSS
$custom: #40145e;
$custom-light: #78568c;
$custom-dark: #000000;
JSON
{
  "hex": "#40145e",
  "rgb": {
    "r": 64,
    "g": 20,
    "b": 94
  },
  "hsl": {
    "h": 275.676,
    "s": 64.912,
    "l": 22.353
  },
  "oklch": {
    "l": 0.3041,
    "c": 0.12522,
    "h": 307.6
  },
  "luminance": 0.02398
}

Semantic roles & 50–950 ramp

primary
#40145E
secondary
#5E9638
accent
#E84084
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40145E

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

Preview Lab → · Contrast checker → · Palette generator →

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