#40167F#40167F

#40167F is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.7% C 0.160 H 294.0°. Best body text is #FFFFFF at 12.81:1 contrast (WCAG AA passes).

Color values

HEX#40167F
RGBrgb(64, 22, 127)
HSLhsl(264, 70%, 29%)
HSVhsv(264, 83%, 50%)
CMYKcmyk(49.6%, 82.7%, 0%, 50.2%)
CIE-LABlab(20.81, 42.94, -50.90)
CIE-LCHlch(20.81, 66.59, 310.15°)
OKLaboklab(33.7% 0.0651 -0.1461)
OKLCHoklch(33.7% 0.16 294)
XYZxyz(6.2310, 3.1959, 20.3631)
Luminance0.0320 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40167F #557F16
analogous
#16217F #40167F #75167F
triadic
#40167F #7F4016 #167F40
tetradic
#40167F #7F1621 #557F16 #167F75
square
#40167F #7F1621 #557F16 #167F75
split-complementary
#40167F #7F7516 #217F16
monochromatic
#0D051A #260D4B #40167F #5A1FB3 #7734DC

Accessibility & contrast

On white

12.81
#40167F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#40167F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40167F
12.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40167F#FFFFFF#000000##FFFFFF
##40167F1.0012.811.6412.81
#FFFFFF12.811.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003382
Deuteranopia (green-blind)
#00307D
Tritanopia (blue-blind)
#2D344B
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #40167f;
/* rgb */ color: rgb(64, 22, 127);
/* oklch */ color: oklch(33.7% 0.160 294.0);
Tailwind
colors: {
  custom: {
    50: '#7c59a5',
    500: '#40167f',
    950: '#000000',
  },
}
SCSS
$custom: #40167f;
$custom-light: #7c59a5;
$custom-dark: #000000;
JSON
{
  "hex": "#40167f",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 127
  },
  "hsl": {
    "h": 264,
    "s": 70.47,
    "l": 29.216
  },
  "oklch": {
    "l": 0.33701,
    "c": 0.15993,
    "h": 294
  },
  "luminance": 0.03196
}

Semantic roles & 50–950 ramp

primary
#40167F
secondary
#84B43D
accent
#ED3BA6
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40167F

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

Preview Lab → · Contrast checker → · Palette generator →

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