#40167D#40167D

#40167D is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.158 H 294.7°. Best body text is #FFFFFF at 12.89:1 contrast (WCAG AA passes).

Color values

HEX#40167D
RGBrgb(64, 22, 125)
HSLhsl(264, 70%, 29%)
HSVhsv(264, 82%, 49%)
CMYKcmyk(48.8%, 82.4%, 0%, 51%)
CIE-LABlab(20.61, 42.39, -49.96)
CIE-LCHlch(20.61, 65.52, 310.32°)
OKLaboklab(33.5% 0.0658 -0.1433)
OKLCHoklch(33.5% 0.158 294.7)
XYZxyz(6.1019, 3.1443, 19.6835)
Luminance0.0314 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40167D #537D16
analogous
#16207D #40167D #74167D
triadic
#40167D #7D4016 #167D40
tetradic
#40167D #7D1620 #537D16 #167D74
square
#40167D #7D1620 #537D16 #167D74
split-complementary
#40167D #7D7416 #207D16
monochromatic
#0D051A #250D49 #40167D #5B1FB1 #7732DB

Accessibility & contrast

On white

12.89
#40167D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#40167D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40167D
12.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40167D#FFFFFF#000000##FFFFFF
##40167D1.0012.891.6312.89
#FFFFFF12.891.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003380
Deuteranopia (green-blind)
#00307B
Tritanopia (blue-blind)
#2E334A
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40167d;
/* rgb */ color: rgb(64, 22, 125);
/* oklch */ color: oklch(33.5% 0.158 294.7);
Tailwind
colors: {
  custom: {
    50: '#7c59a4',
    500: '#40167d',
    950: '#000000',
  },
}
SCSS
$custom: #40167d;
$custom-light: #7c59a4;
$custom-dark: #000000;
JSON
{
  "hex": "#40167d",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 125
  },
  "hsl": {
    "h": 264.466,
    "s": 70.068,
    "l": 28.824
  },
  "oklch": {
    "l": 0.33502,
    "c": 0.15769,
    "h": 294.7
  },
  "luminance": 0.03144
}

Semantic roles & 50–950 ramp

primary
#40167D
secondary
#82B23D
accent
#ED3BA4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40167D

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

Preview Lab → · Contrast checker → · Palette generator →

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