#40218D#40218D

#40218D is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.3% C 0.165 H 288.4°. Best body text is #FFFFFF at 11.54:1 contrast (WCAG AA passes).

Color values

HEX#40218D
RGBrgb(64, 33, 141)
HSLhsl(257, 62%, 34%)
HSVhsv(257, 77%, 55%)
CMYKcmyk(54.6%, 76.6%, 0%, 44.7%)
CIE-LABlab(24.00, 41.70, -54.46)
CIE-LCHlch(24.00, 68.59, 307.44°)
OKLaboklab(36.35% 0.0521 -0.1566)
OKLCHoklch(36.35% 0.165 288.4)
XYZxyz(7.4645, 4.1004, 25.5923)
Luminance0.0410 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40218D #6E8D21
analogous
#21388D #40218D #76218D
triadic
#40218D #8D4021 #218D40
tetradic
#40218D #8D2138 #6E8D21 #218D76
square
#40218D #8D2138 #6E8D21 #218D76
split-complementary
#40218D #8D7621 #388D21
monochromatic
#130A2A #29155B #40218D #572DBF #7852D6

Accessibility & contrast

On white

11.54
#40218D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#40218D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40218D
11.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40218D#FFFFFF#000000##FFFFFF
##40218D1.0011.541.8211.54
#FFFFFF11.541.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B90
Deuteranopia (green-blind)
#00368B
Tritanopia (blue-blind)
#213F55
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40218d;
/* rgb */ color: rgb(64, 33, 141);
/* oklch */ color: oklch(36.3% 0.165 288.4);
Tailwind
colors: {
  custom: {
    50: '#7e60af',
    500: '#40218d',
    950: '#000000',
  },
}
SCSS
$custom: #40218d;
$custom-light: #7e60af;
$custom-dark: #000000;
JSON
{
  "hex": "#40218d",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 141
  },
  "hsl": {
    "h": 257.222,
    "s": 62.069,
    "l": 34.118
  },
  "oklch": {
    "l": 0.36347,
    "c": 0.16504,
    "h": 288.4
  },
  "luminance": 0.04101
}

Semantic roles & 50–950 ramp

primary
#40218D
secondary
#9BBA50
accent
#E543B7
background
#F8F5FA
surface
#EFEAF5
border
#CAC6CF
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40218D

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

Preview Lab → · Contrast checker → · Palette generator →

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