#40217E#40217E

#40217E is a dark, vivid violet. Relative luminance 0.037; OKLCH L 34.9% C 0.147 H 292.3°. Best body text is #FFFFFF at 12.09:1 contrast (WCAG AA passes).

Color values

HEX#40217E
RGBrgb(64, 33, 126)
HSLhsl(260, 58%, 31%)
HSVhsv(260, 74%, 49%)
CMYKcmyk(49.2%, 73.8%, 0%, 50.6%)
CIE-LABlab(22.60, 37.29, -47.35)
CIE-LCHlch(22.60, 60.27, 308.23°)
OKLaboklab(34.92% 0.0558 -0.1357)
OKLCHoklch(34.92% 0.147 292.3)
XYZxyz(6.4231, 3.6838, 20.1072)
Luminance0.0368 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40217E #5F7E21
analogous
#21307E #40217E #6E217E
triadic
#40217E #7E4021 #217E40
tetradic
#40217E #7E2130 #5F7E21 #217E6E
square
#40217E #7E2130 #5F7E21 #217E6E
split-complementary
#40217E #7E6E21 #307E21
monochromatic
#0F081D #27144E #40217E #592EAE #764AD0

Accessibility & contrast

On white

12.09
#40217E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#40217E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40217E
12.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40217E#FFFFFF#000000##FFFFFF
##40217E1.0012.091.7412.09
#FFFFFF12.091.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003781
Deuteranopia (green-blind)
#00347C
Tritanopia (blue-blind)
#2D394D
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40217e;
/* rgb */ color: rgb(64, 33, 126);
/* oklch */ color: oklch(34.9% 0.147 292.3);
Tailwind
colors: {
  custom: {
    50: '#7b5fa4',
    500: '#40217e',
    950: '#000000',
  },
}
SCSS
$custom: #40217e;
$custom-light: #7b5fa4;
$custom-dark: #000000;
JSON
{
  "hex": "#40217e",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 126
  },
  "hsl": {
    "h": 260,
    "s": 58.491,
    "l": 31.176
  },
  "oklch": {
    "l": 0.34925,
    "c": 0.14676,
    "h": 292.3
  },
  "luminance": 0.03684
}

Semantic roles & 50–950 ramp

primary
#40217E
secondary
#8FB14A
accent
#E246AE
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40217E

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

Preview Lab → · Contrast checker → · Palette generator →

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