#40168E#40168E

#40168E is a dark, vivid violet. Relative luminance 0.036; OKLCH L 35.2% C 0.177 H 289.7°. Best body text is #FFFFFF at 12.19:1 contrast (WCAG AA passes).

Color values

HEX#40168E
RGBrgb(64, 22, 142)
HSLhsl(261, 73%, 32%)
HSVhsv(261, 85%, 56%)
CMYKcmyk(54.9%, 84.5%, 0%, 44.3%)
CIE-LABlab(22.36, 47.02, -57.78)
CIE-LCHlch(22.36, 74.49, 309.13°)
OKLaboklab(35.24% 0.0597 -0.1662)
OKLCHoklch(35.24% 0.177 289.7)
XYZxyz(7.2823, 3.6165, 25.9003)
Luminance0.0362 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40168E #648E16
analogous
#16288E #40168E #7C168E
triadic
#40168E #8E4016 #168E40
tetradic
#40168E #8E1628 #648E16 #168E7C
square
#40168E #8E1628 #648E16 #168E7C
split-complementary
#40168E #8E7C16 #288E16
monochromatic
#100624 #280E59 #40168E #581EC3 #773DE1

Accessibility & contrast

On white

12.19
#40168E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#40168E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40168E
12.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40168E#FFFFFF#000000##FFFFFF
##40168E1.0012.191.7212.19
#FFFFFF12.191.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003891
Deuteranopia (green-blind)
#00338C
Tritanopia (blue-blind)
#213B54
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #40168e;
/* rgb */ color: rgb(64, 22, 142);
/* oklch */ color: oklch(35.2% 0.177 289.7);
Tailwind
colors: {
  custom: {
    50: '#7f5ab0',
    500: '#40168e',
    950: '#000000',
  },
}
SCSS
$custom: #40168e;
$custom-light: #7f5ab0;
$custom-dark: #000000;
JSON
{
  "hex": "#40168e",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 142
  },
  "hsl": {
    "h": 261,
    "s": 73.171,
    "l": 32.157
  },
  "oklch": {
    "l": 0.35236,
    "c": 0.17658,
    "h": 289.7
  },
  "luminance": 0.03617
}

Semantic roles & 50–950 ramp

primary
#40168E
secondary
#93C13F
accent
#F038AF
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0411
muted
#7C7980

Preview Lab

Preview with #40168E

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

Preview Lab → · Contrast checker → · Palette generator →

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