#40168F#40168F

#40168F is a dark, vivid violet. Relative luminance 0.036; OKLCH L 35.3% C 0.178 H 289.5°. Best body text is #FFFFFF at 12.14:1 contrast (WCAG AA passes).

Color values

HEX#40168F
RGBrgb(64, 22, 143)
HSLhsl(261, 73%, 32%)
HSVhsv(261, 85%, 56%)
CMYKcmyk(55.2%, 84.6%, 0%, 43.9%)
CIE-LABlab(22.47, 47.29, -58.23)
CIE-LCHlch(22.47, 75.01, 309.08°)
OKLaboklab(35.34% 0.0593 -0.1675)
OKLCHoklch(35.34% 0.178 289.5)
XYZxyz(7.3577, 3.6466, 26.2975)
Luminance0.0365 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40168F #658F16
analogous
#16298F #40168F #7C168F
triadic
#40168F #8F4016 #168F40
tetradic
#40168F #8F1629 #658F16 #168F7C
square
#40168F #8F1629 #658F16 #168F7C
split-complementary
#40168F #8F7C16 #298F16
monochromatic
#110625 #280E5A #40168F #581EC4 #773EE1

Accessibility & contrast

On white

12.14
#40168F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#40168F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40168F
12.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40168F#FFFFFF#000000##FFFFFF
##40168F1.0012.141.7312.14
#FFFFFF12.141.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003892
Deuteranopia (green-blind)
#00338D
Tritanopia (blue-blind)
#203B54
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40168f;
/* rgb */ color: rgb(64, 22, 143);
/* oklch */ color: oklch(35.3% 0.178 289.5);
Tailwind
colors: {
  custom: {
    50: '#7f5ab1',
    500: '#40168f',
    950: '#000000',
  },
}
SCSS
$custom: #40168f;
$custom-light: #7f5ab1;
$custom-dark: #000000;
JSON
{
  "hex": "#40168f",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 143
  },
  "hsl": {
    "h": 260.826,
    "s": 73.333,
    "l": 32.353
  },
  "oklch": {
    "l": 0.35341,
    "c": 0.17769,
    "h": 289.5
  },
  "luminance": 0.03647
}

Semantic roles & 50–950 ramp

primary
#40168F
secondary
#94C13F
accent
#F038B0
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0411
muted
#7C7980

Preview Lab

Preview with #40168F

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

Preview Lab → · Contrast checker → · Palette generator →

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