#40208D#40208D

#40208D is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.2% C 0.166 H 288.6°. Best body text is #FFFFFF at 11.61:1 contrast (WCAG AA passes).

Color values

HEX#40208D
RGBrgb(64, 32, 141)
HSLhsl(258, 63%, 34%)
HSVhsv(258, 77%, 55%)
CMYKcmyk(54.6%, 77.3%, 0%, 44.7%)
CIE-LABlab(23.82, 42.21, -54.75)
CIE-LCHlch(23.82, 69.14, 307.63°)
OKLaboklab(36.22% 0.0529 -0.1574)
OKLCHoklch(36.22% 0.166 288.6)
XYZxyz(7.4372, 4.0457, 25.5832)
Luminance0.0405 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40208D #6D8D20
analogous
#20368D #40208D #77208D
triadic
#40208D #8D4020 #208D40
tetradic
#40208D #8D2036 #6D8D20 #208D77
square
#40208D #8D2036 #6D8D20 #208D77
split-complementary
#40208D #8D7720 #368D20
monochromatic
#130929 #29155B #40208D #572BBF #7850D7

Accessibility & contrast

On white

11.61
#40208D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#40208D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40208D
11.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40208D#FFFFFF#000000##FFFFFF
##40208D1.0011.611.8111.61
#FFFFFF11.611.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.611.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40208d;
/* rgb */ color: rgb(64, 32, 141);
/* oklch */ color: oklch(36.2% 0.166 288.6);
Tailwind
colors: {
  custom: {
    50: '#7e5faf',
    500: '#40208d',
    950: '#000000',
  },
}
SCSS
$custom: #40208d;
$custom-light: #7e5faf;
$custom-dark: #000000;
JSON
{
  "hex": "#40208d",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 141
  },
  "hsl": {
    "h": 257.615,
    "s": 63.006,
    "l": 33.922
  },
  "oklch": {
    "l": 0.36221,
    "c": 0.16611,
    "h": 288.6
  },
  "luminance": 0.04046
}

Semantic roles & 50–950 ramp

primary
#40208D
secondary
#9BBA4E
accent
#E642B6
background
#F8F5FA
surface
#EFE9F5
border
#CAC5CF
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #40208D

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

Preview Lab → · Contrast checker → · Palette generator →

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