#40208E#40208E

#40208E is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.3% C 0.167 H 288.3°. Best body text is #FFFFFF at 11.57:1 contrast (WCAG AA passes).

Color values

HEX#40208E
RGBrgb(64, 32, 142)
HSLhsl(257, 63%, 34%)
HSVhsv(257, 77%, 56%)
CMYKcmyk(54.9%, 77.5%, 0%, 44.3%)
CIE-LABlab(23.92, 42.50, -55.22)
CIE-LCHlch(23.92, 69.68, 307.59°)
OKLaboklab(36.32% 0.0526 -0.1588)
OKLCHoklch(36.32% 0.167 288.3)
XYZxyz(7.5119, 4.0756, 25.9768)
Luminance0.0408 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40208E #6E8E20
analogous
#20378E #40208E #77208E
triadic
#40208E #8E4020 #208E40
tetradic
#40208E #8E2037 #6E8E20 #208E77
square
#40208E #8E2037 #6E8E20 #208E77
split-complementary
#40208E #8E7720 #378E20
monochromatic
#13092A #29155C #40208E #572BC0 #7851D8

Accessibility & contrast

On white

11.57
#40208E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#40208E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40208E
11.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40208E#FFFFFF#000000##FFFFFF
##40208E1.0011.571.8211.57
#FFFFFF11.571.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B91
Deuteranopia (green-blind)
#00368C
Tritanopia (blue-blind)
#213F56
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #40208e;
/* rgb */ color: rgb(64, 32, 142);
/* oklch */ color: oklch(36.3% 0.167 288.3);
Tailwind
colors: {
  custom: {
    50: '#7e5fb0',
    500: '#40208e',
    950: '#000000',
  },
}
SCSS
$custom: #40208e;
$custom-light: #7e5fb0;
$custom-dark: #000000;
JSON
{
  "hex": "#40208e",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 142
  },
  "hsl": {
    "h": 257.455,
    "s": 63.218,
    "l": 34.118
  },
  "oklch": {
    "l": 0.3632,
    "c": 0.1673,
    "h": 288.3
  },
  "luminance": 0.04076
}

Semantic roles & 50–950 ramp

primary
#40208E
secondary
#9BBB4F
accent
#E642B6
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0511
muted
#7C7980

Preview Lab

Preview with #40208E

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

Preview Lab → · Contrast checker → · Palette generator →

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