#401781#401781

#401781 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 34.0% C 0.161 H 293.3°. Best body text is #FFFFFF at 12.67:1 contrast (WCAG AA passes).

Color values

HEX#401781
RGBrgb(64, 23, 129)
HSLhsl(263, 70%, 30%)
HSVhsv(263, 82%, 51%)
CMYKcmyk(50.4%, 82.2%, 0%, 49.4%)
CIE-LABlab(21.16, 43.05, -51.60)
CIE-LCHlch(21.16, 67.20, 309.84°)
OKLaboklab(34% 0.0637 -0.1481)
OKLCHoklch(34% 0.161 293.3)
XYZxyz(6.3821, 3.2875, 21.0629)
Luminance0.0329 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401781 #588117
analogous
#172381 #401781 #751781
triadic
#401781 #814017 #178140
tetradic
#401781 #811723 #588117 #178175
square
#401781 #811723 #588117 #178175
split-complementary
#401781 #817517 #238117
monochromatic
#0D051A #260E4D #401781 #5A20B5 #7737DB

Accessibility & contrast

On white

12.67
#401781 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#401781 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401781
12.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401781#FFFFFF#000000##FFFFFF
##4017811.0012.671.6612.67
#FFFFFF12.671.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003484
Deuteranopia (green-blind)
#00317F
Tritanopia (blue-blind)
#2B364C
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #401781;
/* rgb */ color: rgb(64, 23, 129);
/* oklch */ color: oklch(34.0% 0.161 293.3);
Tailwind
colors: {
  custom: {
    50: '#7d5aa7',
    500: '#401781',
    950: '#000000',
  },
}
SCSS
$custom: #401781;
$custom-light: #7d5aa7;
$custom-dark: #000000;
JSON
{
  "hex": "#401781",
  "rgb": {
    "r": 64,
    "g": 23,
    "b": 129
  },
  "hsl": {
    "h": 263.208,
    "s": 69.737,
    "l": 29.804
  },
  "oklch": {
    "l": 0.34003,
    "c": 0.16123,
    "h": 293.3
  },
  "luminance": 0.03288
}

Semantic roles & 50–950 ramp

primary
#401781
secondary
#87B53E
accent
#ED3BA8
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #401781

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

Preview Lab → · Contrast checker → · Palette generator →

#401781 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva