#40166F#40166F

#40166F is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.2% C 0.142 H 299.6°. Best body text is #FFFFFF at 13.44:1 contrast (WCAG AA passes).

Color values

HEX#40166F
RGBrgb(64, 22, 111)
HSLhsl(268, 67%, 26%)
HSVhsv(268, 80%, 44%)
CMYKcmyk(42.3%, 80.2%, 0%, 56.5%)
CIE-LABlab(19.27, 38.62, -43.17)
CIE-LCHlch(19.27, 57.92, 311.82°)
OKLaboklab(32.16% 0.0702 -0.1234)
OKLCHoklch(32.16% 0.142 299.6)
XYZxyz(5.2698, 2.8114, 15.3009)
Luminance0.0281 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40166F #456F16
analogous
#16186F #40166F #6C166F
triadic
#40166F #6F4016 #166F40
tetradic
#40166F #6F1618 #456F16 #166F6C
square
#40166F #6F1618 #456F16 #166F6C
split-complementary
#40166F #6F6C16 #186F16
monochromatic
#0F051A #230C3C #40166F #5D20A2 #7B2BD5

Accessibility & contrast

On white

13.44
#40166F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#40166F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40166F
13.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40166F#FFFFFF#000000##FFFFFF
##40166F1.0013.441.5613.44
#FFFFFF13.441.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F71
Deuteranopia (green-blind)
#002E6D
Tritanopia (blue-blind)
#352E42
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #40166f;
/* rgb */ color: rgb(64, 22, 111);
/* oklch */ color: oklch(32.2% 0.142 299.6);
Tailwind
colors: {
  custom: {
    50: '#7a5899',
    500: '#40166f',
    950: '#000000',
  },
}
SCSS
$custom: #40166f;
$custom-light: #7a5899;
$custom-dark: #000000;
JSON
{
  "hex": "#40166f",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 111
  },
  "hsl": {
    "h": 268.315,
    "s": 66.917,
    "l": 26.078
  },
  "oklch": {
    "l": 0.32156,
    "c": 0.14194,
    "h": 299.6
  },
  "luminance": 0.02812
}

Semantic roles & 50–950 ramp

primary
#40166F
secondary
#73A53C
accent
#EA3E99
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040E
muted
#7C797E

Preview Lab

Preview with #40166F

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

Preview Lab → · Contrast checker → · Palette generator →

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