#40166C#40166C

#40166C is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.9% C 0.139 H 300.8°. Best body text is #FFFFFF at 13.55:1 contrast (WCAG AA passes).

Color values

HEX#40166C
RGBrgb(64, 22, 108)
HSLhsl(269, 66%, 25%)
HSVhsv(269, 80%, 42%)
CMYKcmyk(40.7%, 79.6%, 0%, 57.6%)
CIE-LABlab(19.00, 37.82, -41.66)
CIE-LCHlch(19.00, 56.27, 312.23°)
OKLaboklab(31.88% 0.071 -0.119)
OKLCHoklch(31.88% 0.139 300.8)
XYZxyz(5.1074, 2.7465, 14.4455)
Luminance0.0275 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40166C #426C16
analogous
#16176C #40166C #6B166C
triadic
#40166C #6C4016 #166C40
tetradic
#40166C #6C1617 #426C16 #166C6B
square
#40166C #6C1617 #426C16 #166C6B
split-complementary
#40166C #6C6B16 #176C16
monochromatic
#0F0519 #220C39 #40166C #5E209F #7C2BD2

Accessibility & contrast

On white

13.55
#40166C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#40166C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40166C
13.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40166C#FFFFFF#000000##FFFFFF
##40166C1.0013.551.5513.55
#FFFFFF13.551.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E6E
Deuteranopia (green-blind)
#002E6A
Tritanopia (blue-blind)
#362C40
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #40166c;
/* rgb */ color: rgb(64, 22, 108);
/* oklch */ color: oklch(31.9% 0.139 300.8);
Tailwind
colors: {
  custom: {
    50: '#7a5897',
    500: '#40166c',
    950: '#000000',
  },
}
SCSS
$custom: #40166c;
$custom-light: #7a5897;
$custom-dark: #000000;
JSON
{
  "hex": "#40166c",
  "rgb": {
    "r": 64,
    "g": 22,
    "b": 108
  },
  "hsl": {
    "h": 269.302,
    "s": 66.154,
    "l": 25.49
  },
  "oklch": {
    "l": 0.31879,
    "c": 0.13854,
    "h": 300.8
  },
  "luminance": 0.02747
}

Semantic roles & 50–950 ramp

primary
#40166C
secondary
#70A23C
accent
#E93F96
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040D
muted
#7C797E

Preview Lab

Preview with #40166C

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

Preview Lab → · Contrast checker → · Palette generator →

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