#40218E#40218E

#40218E is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.4% C 0.166 H 288.2°. Best body text is #FFFFFF at 11.50:1 contrast (WCAG AA passes).

Color values

HEX#40218E
RGBrgb(64, 33, 142)
HSLhsl(257, 62%, 34%)
HSVhsv(257, 77%, 56%)
CMYKcmyk(54.9%, 76.8%, 0%, 44.3%)
CIE-LABlab(24.10, 42.00, -54.92)
CIE-LCHlch(24.10, 69.14, 307.40°)
OKLaboklab(36.44% 0.0518 -0.158)
OKLCHoklch(36.44% 0.166 288.2)
XYZxyz(7.5393, 4.1303, 25.9859)
Luminance0.0413 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40218E #6F8E21
analogous
#21398E #40218E #77218E
triadic
#40218E #8E4021 #218E40
tetradic
#40218E #8E2139 #6F8E21 #218E77
square
#40218E #8E2139 #6F8E21 #218E77
split-complementary
#40218E #8E7721 #398E21
monochromatic
#130A2B #2A155C #40218E #562DC0 #7852D7

Accessibility & contrast

On white

11.50
#40218E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#40218E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40218E
11.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40218E#FFFFFF#000000##FFFFFF
##40218E1.0011.501.8311.50
#FFFFFF11.501.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C91
Deuteranopia (green-blind)
#00368C
Tritanopia (blue-blind)
#213F56
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40218e;
/* rgb */ color: rgb(64, 33, 142);
/* oklch */ color: oklch(36.4% 0.166 288.2);
Tailwind
colors: {
  custom: {
    50: '#7e60b0',
    500: '#40218e',
    950: '#000000',
  },
}
SCSS
$custom: #40218e;
$custom-light: #7e60b0;
$custom-dark: #000000;
JSON
{
  "hex": "#40218e",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 142
  },
  "hsl": {
    "h": 257.064,
    "s": 62.286,
    "l": 34.314
  },
  "oklch": {
    "l": 0.36444,
    "c": 0.16625,
    "h": 288.2
  },
  "luminance": 0.04131
}

Semantic roles & 50–950 ramp

primary
#40218E
secondary
#9CBA50
accent
#E542B7
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #40218E

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

Preview Lab → · Contrast checker → · Palette generator →

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