#40217F#40217F

#40217F is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.0% C 0.148 H 292.1°. Best body text is #FFFFFF at 12.06:1 contrast (WCAG AA passes).

Color values

HEX#40217F
RGBrgb(64, 33, 127)
HSLhsl(260, 59%, 31%)
HSVhsv(260, 74%, 50%)
CMYKcmyk(49.6%, 74%, 0%, 50.2%)
CIE-LABlab(22.69, 37.58, -47.83)
CIE-LCHlch(22.69, 60.83, 308.16°)
OKLaboklab(35.02% 0.0556 -0.1372)
OKLCHoklch(35.02% 0.148 292.1)
XYZxyz(6.4879, 3.7098, 20.4488)
Luminance0.0371 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40217F #607F21
analogous
#21317F #40217F #6F217F
triadic
#40217F #7F4021 #217F40
tetradic
#40217F #7F2131 #607F21 #217F6F
square
#40217F #7F2131 #607F21 #217F6F
split-complementary
#40217F #7F6F21 #317F21
monochromatic
#0F081E #28144E #40217F #582EB0 #764AD0

Accessibility & contrast

On white

12.06
#40217F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40217F
12.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40217F#FFFFFF#000000##FFFFFF
##40217F1.0012.061.7412.06
#FFFFFF12.061.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003882
Deuteranopia (green-blind)
#00347D
Tritanopia (blue-blind)
#2C394E
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40217f;
/* rgb */ color: rgb(64, 33, 127);
/* oklch */ color: oklch(35.0% 0.148 292.1);
Tailwind
colors: {
  custom: {
    50: '#7b5fa5',
    500: '#40217f',
    950: '#000000',
  },
}
SCSS
$custom: #40217f;
$custom-light: #7b5fa5;
$custom-dark: #000000;
JSON
{
  "hex": "#40217f",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 127
  },
  "hsl": {
    "h": 259.787,
    "s": 58.75,
    "l": 31.373
  },
  "oklch": {
    "l": 0.35017,
    "c": 0.14799,
    "h": 292.1
  },
  "luminance": 0.0371
}

Semantic roles & 50–950 ramp

primary
#40217F
secondary
#90B24A
accent
#E246AE
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40217F

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

Preview Lab → · Contrast checker → · Palette generator →

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