#40218C#40218C

#40218C is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.2% C 0.164 H 288.6°. Best body text is #FFFFFF at 11.58:1 contrast (WCAG AA passes).

Color values

HEX#40218C
RGBrgb(64, 33, 140)
HSLhsl(257, 62%, 34%)
HSVhsv(257, 76%, 55%)
CMYKcmyk(54.3%, 76.4%, 0%, 45.1%)
CIE-LABlab(23.90, 41.41, -54.00)
CIE-LCHlch(23.90, 68.05, 307.48°)
OKLaboklab(36.25% 0.0524 -0.1552)
OKLCHoklch(36.25% 0.164 288.6)
XYZxyz(7.3904, 4.0708, 25.2022)
Luminance0.0407 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40218C #6D8C21
analogous
#21388C #40218C #76218C
triadic
#40218C #8C4021 #218C40
tetradic
#40218C #8C2138 #6D8C21 #218C76
square
#40218C #8C2138 #6D8C21 #218C76
split-complementary
#40218C #8C7621 #388C21
monochromatic
#130A29 #29155A #40218C #572DBE #7851D6

Accessibility & contrast

On white

11.58
#40218C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#40218C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40218C
11.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40218C#FFFFFF#000000##FFFFFF
##40218C1.0011.581.8111.58
#FFFFFF11.581.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8F
Deuteranopia (green-blind)
#00368A
Tritanopia (blue-blind)
#223E55
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40218c;
/* rgb */ color: rgb(64, 33, 140);
/* oklch */ color: oklch(36.2% 0.164 288.6);
Tailwind
colors: {
  custom: {
    50: '#7e60af',
    500: '#40218c',
    950: '#000000',
  },
}
SCSS
$custom: #40218c;
$custom-light: #7e60af;
$custom-dark: #000000;
JSON
{
  "hex": "#40218c",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 140
  },
  "hsl": {
    "h": 257.383,
    "s": 61.85,
    "l": 33.922
  },
  "oklch": {
    "l": 0.36249,
    "c": 0.16384,
    "h": 288.6
  },
  "luminance": 0.04071
}

Semantic roles & 50–950 ramp

primary
#40218C
secondary
#9BB94F
accent
#E543B6
background
#F8F5FA
surface
#EFEAF5
border
#CAC6CF
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40218C

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

Preview Lab → · Contrast checker → · Palette generator →

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