#40217A#40217A

#40217A is a dark, vivid violet. Relative luminance 0.036; OKLCH L 34.6% C 0.142 H 293.5°. Best body text is #FFFFFF at 12.23:1 contrast (WCAG AA passes).

Color values

HEX#40217A
RGBrgb(64, 33, 122)
HSLhsl(261, 57%, 30%)
HSVhsv(261, 73%, 48%)
CMYKcmyk(47.5%, 73%, 0%, 52.2%)
CIE-LABlab(22.24, 36.12, -45.39)
CIE-LCHlch(22.24, 58.00, 308.51°)
OKLaboklab(34.56% 0.0566 -0.13)
OKLCHoklch(34.56% 0.142 293.5)
XYZxyz(6.1701, 3.5827, 18.7750)
Luminance0.0358 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40217A #5B7A21
analogous
#212E7A #40217A #6C217A
triadic
#40217A #7A4021 #217A40
tetradic
#40217A #7A212E #5B7A21 #217A6C
square
#40217A #7A212E #5B7A21 #217A6C
split-complementary
#40217A #7A6C21 #2E7A21
monochromatic
#0D071A #27144A #40217A #592EAA #7648CD

Accessibility & contrast

On white

12.23
#40217A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#40217A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40217A
12.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40217A#FFFFFF#000000##FFFFFF
##40217A1.0012.231.7212.23
#FFFFFF12.231.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00367D
Deuteranopia (green-blind)
#003478
Tritanopia (blue-blind)
#2F374B
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #40217a;
/* rgb */ color: rgb(64, 33, 122);
/* oklch */ color: oklch(34.6% 0.142 293.5);
Tailwind
colors: {
  custom: {
    50: '#7b5fa1',
    500: '#40217a',
    950: '#000000',
  },
}
SCSS
$custom: #40217a;
$custom-light: #7b5fa1;
$custom-dark: #000000;
JSON
{
  "hex": "#40217a",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 122
  },
  "hsl": {
    "h": 260.899,
    "s": 57.419,
    "l": 30.392
  },
  "oklch": {
    "l": 0.34561,
    "c": 0.14179,
    "h": 293.5
  },
  "luminance": 0.03583
}

Semantic roles & 50–950 ramp

primary
#40217A
secondary
#8AAD4A
accent
#E147AB
background
#F7F5FA
surface
#EEE9F3
border
#C9C5CD
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40217A

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

Preview Lab → · Contrast checker → · Palette generator →

#40217A Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva