#40217D#40217D

#40217D is a dark, vivid violet. Relative luminance 0.037; OKLCH L 34.8% C 0.146 H 292.6°. Best body text is #FFFFFF at 12.13:1 contrast (WCAG AA passes).

Color values

HEX#40217D
RGBrgb(64, 33, 125)
HSLhsl(260, 58%, 31%)
HSVhsv(260, 74%, 49%)
CMYKcmyk(48.8%, 73.6%, 0%, 51%)
CIE-LABlab(22.51, 37.00, -46.86)
CIE-LCHlch(22.51, 59.70, 308.29°)
OKLaboklab(34.83% 0.056 -0.1343)
OKLCHoklch(34.83% 0.146 292.6)
XYZxyz(6.3589, 3.6582, 19.7691)
Luminance0.0366 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40217D #5E7D21
analogous
#21307D #40217D #6E217D
triadic
#40217D #7D4021 #217D40
tetradic
#40217D #7D2130 #5E7D21 #217D6E
square
#40217D #7D2130 #5E7D21 #217D6E
split-complementary
#40217D #7D6E21 #307D21
monochromatic
#0E071C #27144D #40217D #592EAD #7649CF

Accessibility & contrast

On white

12.13
#40217D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#40217D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40217D
12.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40217D#FFFFFF#000000##FFFFFF
##40217D1.0012.131.7312.13
#FFFFFF12.131.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003780
Deuteranopia (green-blind)
#00347B
Tritanopia (blue-blind)
#2D394C
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40217d;
/* rgb */ color: rgb(64, 33, 125);
/* oklch */ color: oklch(34.8% 0.146 292.6);
Tailwind
colors: {
  custom: {
    50: '#7b5fa3',
    500: '#40217d',
    950: '#000000',
  },
}
SCSS
$custom: #40217d;
$custom-light: #7b5fa3;
$custom-dark: #000000;
JSON
{
  "hex": "#40217d",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 125
  },
  "hsl": {
    "h": 260.217,
    "s": 58.228,
    "l": 30.98
  },
  "oklch": {
    "l": 0.34833,
    "c": 0.14552,
    "h": 292.6
  },
  "luminance": 0.03658
}

Semantic roles & 50–950 ramp

primary
#40217D
secondary
#8EB04A
accent
#E146AD
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40217D

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

Preview Lab → · Contrast checker → · Palette generator →

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