#40217C#40217C

#40217C is a dark, vivid violet. Relative luminance 0.036; OKLCH L 34.7% C 0.144 H 292.9°. Best body text is #FFFFFF at 12.16:1 contrast (WCAG AA passes).

Color values

HEX#40217C
RGBrgb(64, 33, 124)
HSLhsl(260, 58%, 31%)
HSVhsv(260, 73%, 49%)
CMYKcmyk(48.4%, 73.4%, 0%, 51.4%)
CIE-LABlab(22.42, 36.71, -46.37)
CIE-LCHlch(22.42, 59.14, 308.36°)
OKLaboklab(34.74% 0.0562 -0.1329)
OKLCHoklch(34.74% 0.144 292.9)
XYZxyz(6.2953, 3.6327, 19.4344)
Luminance0.0363 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40217C #5D7C21
analogous
#212F7C #40217C #6D217C
triadic
#40217C #7C4021 #217C40
tetradic
#40217C #7C212F #5D7C21 #217C6D
square
#40217C #7C212F #5D7C21 #217C6D
split-complementary
#40217C #7C6D21 #2F7C21
monochromatic
#0E071B #27144C #40217C #592EAC #7649CF

Accessibility & contrast

On white

12.16
#40217C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40217C
12.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40217C#FFFFFF#000000##FFFFFF
##40217C1.0012.161.7312.16
#FFFFFF12.161.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377F
Deuteranopia (green-blind)
#00347A
Tritanopia (blue-blind)
#2E384C
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40217c;
/* rgb */ color: rgb(64, 33, 124);
/* oklch */ color: oklch(34.7% 0.144 292.9);
Tailwind
colors: {
  custom: {
    50: '#7b5fa3',
    500: '#40217c',
    950: '#000000',
  },
}
SCSS
$custom: #40217c;
$custom-light: #7b5fa3;
$custom-dark: #000000;
JSON
{
  "hex": "#40217c",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 124
  },
  "hsl": {
    "h": 260.44,
    "s": 57.962,
    "l": 30.784
  },
  "oklch": {
    "l": 0.34742,
    "c": 0.14427,
    "h": 292.9
  },
  "luminance": 0.03633
}

Semantic roles & 50–950 ramp

primary
#40217C
secondary
#8CAF4A
accent
#E147AD
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40217C

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

Preview Lab → · Contrast checker → · Palette generator →

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