#40167A#40167A

#40167A is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.2% C 0.154 H 295.6°. Best body text is #FFFFFF at 13.01:1 contrast (WCAG AA passes).

Color values

HEX#40167A
RGBrgb(64, 22, 122)
HSLhsl(265, 69%, 28%)
HSVhsv(265, 82%, 48%)
CMYKcmyk(47.5%, 82%, 0%, 52.2%)
CIE-LABlab(20.32, 41.58, -48.53)
CIE-LCHlch(20.32, 63.91, 310.59°)
OKLaboklab(33.21% 0.0668 -0.1391)
OKLCHoklch(33.21% 0.154 295.6)
XYZxyz(5.9132, 3.0688, 18.6894)
Luminance0.0307 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40167A #507A16
analogous
#161E7A #40167A #72167A
triadic
#40167A #7A4016 #167A40
tetradic
#40167A #7A161E #507A16 #167A72
square
#40167A #7A161E #507A16 #167A72
split-complementary
#40167A #7A7216 #1E7A16
monochromatic
#0E051A #250D46 #40167A #5B1FAE #7831DA

Accessibility & contrast

On white

13.01
#40167A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#40167A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40167A
13.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40167A#FFFFFF#000000##FFFFFF
##40167A1.0013.011.6113.01
#FFFFFF13.011.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327D
Deuteranopia (green-blind)
#002F78
Tritanopia (blue-blind)
#2F3248
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #40167a;
/* rgb */ color: rgb(64, 22, 122);
/* oklch */ color: oklch(33.2% 0.154 295.6);
Tailwind
colors: {
  custom: {
    50: '#7c59a1',
    500: '#40167a',
    950: '#000000',
  },
}
SCSS
$custom: #40167a;
$custom-light: #7c59a1;
$custom-dark: #000000;
JSON
{
  "hex": "#40167a",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 122
  },
  "hsl": {
    "h": 265.2,
    "s": 69.444,
    "l": 28.235
  },
  "oklch": {
    "l": 0.33207,
    "c": 0.15433,
    "h": 295.6
  },
  "luminance": 0.03069
}

Semantic roles & 50–950 ramp

primary
#40167A
secondary
#7FAF3D
accent
#EC3CA2
background
#F7F5FA
surface
#EEE9F3
border
#C9C5CD
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40167A

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

Preview Lab → · Contrast checker → · Palette generator →

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