#40218A#40218A

#40218A is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.1% C 0.161 H 289.1°. Best body text is #FFFFFF at 11.65:1 contrast (WCAG AA passes).

Color values

HEX#40218A
RGBrgb(64, 33, 138)
HSLhsl(258, 61%, 34%)
HSVhsv(258, 76%, 54%)
CMYKcmyk(53.6%, 76.1%, 0%, 45.9%)
CIE-LABlab(23.71, 40.82, -53.07)
CIE-LCHlch(23.71, 66.95, 307.57°)
OKLaboklab(36.06% 0.0529 -0.1525)
OKLCHoklch(36.06% 0.161 289.1)
XYZxyz(7.2443, 4.0123, 24.4326)
Luminance0.0401 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40218A #6B8A21
analogous
#21368A #40218A #74218A
triadic
#40218A #8A4021 #218A40
tetradic
#40218A #8A2136 #6B8A21 #218A74
square
#40218A #8A2136 #6B8A21 #218A74
split-complementary
#40218A #8A7421 #368A21
monochromatic
#120927 #291559 #40218A #572DBB #7750D5

Accessibility & contrast

On white

11.65
#40218A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#40218A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40218A
11.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40218A#FFFFFF#000000##FFFFFF
##40218A1.0011.651.8011.65
#FFFFFF11.651.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8D
Deuteranopia (green-blind)
#003688
Tritanopia (blue-blind)
#243E54
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #40218a;
/* rgb */ color: rgb(64, 33, 138);
/* oklch */ color: oklch(36.1% 0.161 289.1);
Tailwind
colors: {
  custom: {
    50: '#7d60ad',
    500: '#40218a',
    950: '#000000',
  },
}
SCSS
$custom: #40218a;
$custom-light: #7d60ad;
$custom-dark: #000000;
JSON
{
  "hex": "#40218a",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 138
  },
  "hsl": {
    "h": 257.714,
    "s": 61.404,
    "l": 33.529
  },
  "oklch": {
    "l": 0.36056,
    "c": 0.16142,
    "h": 289.1
  },
  "luminance": 0.04013
}

Semantic roles & 50–950 ramp

primary
#40218A
secondary
#99B94E
accent
#E543B5
background
#F8F5FA
surface
#EFEAF4
border
#CAC6CE
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40218A

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

Preview Lab → · Contrast checker → · Palette generator →

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