#40218F#40218F

#40218F is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.5% C 0.167 H 287.9°. Best body text is #FFFFFF at 11.46:1 contrast (WCAG AA passes).

Color values

HEX#40218F
RGBrgb(64, 33, 143)
HSLhsl(257, 63%, 35%)
HSVhsv(257, 77%, 56%)
CMYKcmyk(55.2%, 76.9%, 0%, 43.9%)
CIE-LABlab(24.20, 42.29, -55.38)
CIE-LCHlch(24.20, 69.69, 307.37°)
OKLaboklab(36.54% 0.0516 -0.1593)
OKLCHoklch(36.54% 0.167 287.9)
XYZxyz(7.6147, 4.1605, 26.3831)
Luminance0.0416 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40218F #708F21
analogous
#21398F #40218F #77218F
triadic
#40218F #8F4021 #218F40
tetradic
#40218F #8F2139 #708F21 #218F77
square
#40218F #8F2139 #708F21 #218F77
split-complementary
#40218F #8F7721 #398F21
monochromatic
#130A2C #2A165D #40218F #562CC1 #7853D7

Accessibility & contrast

On white

11.46
#40218F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40218F
11.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40218F#FFFFFF#000000##FFFFFF
##40218F1.0011.461.8311.46
#FFFFFF11.461.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C92
Deuteranopia (green-blind)
#00378D
Tritanopia (blue-blind)
#204057
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40218f;
/* rgb */ color: rgb(64, 33, 143);
/* oklch */ color: oklch(36.5% 0.167 287.9);
Tailwind
colors: {
  custom: {
    50: '#7e60b1',
    500: '#40218f',
    950: '#000000',
  },
}
SCSS
$custom: #40218f;
$custom-light: #7e60b1;
$custom-dark: #000000;
JSON
{
  "hex": "#40218f",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 143
  },
  "hsl": {
    "h": 256.909,
    "s": 62.5,
    "l": 34.51
  },
  "oklch": {
    "l": 0.36542,
    "c": 0.16745,
    "h": 287.9
  },
  "luminance": 0.04161
}

Semantic roles & 50–950 ramp

primary
#40218F
secondary
#9DBB51
accent
#E642B8
background
#F8F5FB
surface
#EFEAF6
border
#CAC6D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #40218F

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

Preview Lab → · Contrast checker → · Palette generator →

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