#40167B#40167B

#40167B is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.3% C 0.155 H 295.3°. Best body text is #FFFFFF at 12.97:1 contrast (WCAG AA passes).

Color values

HEX#40167B
RGBrgb(64, 22, 123)
HSLhsl(265, 70%, 28%)
HSVhsv(265, 82%, 48%)
CMYKcmyk(48%, 82.1%, 0%, 51.8%)
CIE-LABlab(20.42, 41.85, -49.01)
CIE-LCHlch(20.42, 64.45, 310.49°)
OKLaboklab(33.31% 0.0664 -0.1405)
OKLCHoklch(33.31% 0.155 295.3)
XYZxyz(5.9754, 3.0937, 19.0174)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40167B #517B16
analogous
#161F7B #40167B #72167B
triadic
#40167B #7B4016 #167B40
tetradic
#40167B #7B161F #517B16 #167B72
square
#40167B #7B161F #517B16 #167B72
split-complementary
#40167B #7B7216 #1F7B16
monochromatic
#0E051A #250D47 #40167B #5B1FAF #7731DA

Accessibility & contrast

On white

12.97
#40167B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#40167B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40167B
12.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40167B#FFFFFF#000000##FFFFFF
##40167B1.0012.971.6212.97
#FFFFFF12.971.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327E
Deuteranopia (green-blind)
#003079
Tritanopia (blue-blind)
#2F3349
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #40167b;
/* rgb */ color: rgb(64, 22, 123);
/* oklch */ color: oklch(33.3% 0.155 295.3);
Tailwind
colors: {
  custom: {
    50: '#7c59a2',
    500: '#40167b',
    950: '#000000',
  },
}
SCSS
$custom: #40167b;
$custom-light: #7c59a2;
$custom-dark: #000000;
JSON
{
  "hex": "#40167b",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 123
  },
  "hsl": {
    "h": 264.95,
    "s": 69.655,
    "l": 28.431
  },
  "oklch": {
    "l": 0.33305,
    "c": 0.15545,
    "h": 295.3
  },
  "luminance": 0.03094
}

Semantic roles & 50–950 ramp

primary
#40167B
secondary
#80B03D
accent
#EC3BA3
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40167B

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

Preview Lab → · Contrast checker → · Palette generator →

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