#40208B#40208B

#40208B is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.0% C 0.164 H 289.1°. Best body text is #FFFFFF at 11.68:1 contrast (WCAG AA passes).

Color values

HEX#40208B
RGBrgb(64, 32, 139)
HSLhsl(258, 63%, 34%)
HSVhsv(258, 77%, 55%)
CMYKcmyk(54%, 77%, 0%, 45.5%)
CIE-LABlab(23.63, 41.63, -53.83)
CIE-LCHlch(23.63, 68.05, 307.72°)
OKLaboklab(36.03% 0.0535 -0.1547)
OKLCHoklch(36.03% 0.164 289.1)
XYZxyz(7.2897, 3.9868, 24.8065)
Luminance0.0399 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40208B #6B8B20
analogous
#20358B #40208B #75208B
triadic
#40208B #8B4020 #208B40
tetradic
#40208B #8B2035 #6B8B20 #208B75
square
#40208B #8B2035 #6B8B20 #208B75
split-complementary
#40208B #8B7520 #358B20
monochromatic
#120928 #291559 #40208B #572BBD #774FD6

Accessibility & contrast

On white

11.68
#40208B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#40208B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40208B
11.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40208B#FFFFFF#000000##FFFFFF
##40208B1.0011.681.8011.68
#FFFFFF11.681.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8E
Deuteranopia (green-blind)
#003689
Tritanopia (blue-blind)
#233E54
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #40208b;
/* rgb */ color: rgb(64, 32, 139);
/* oklch */ color: oklch(36.0% 0.164 289.1);
Tailwind
colors: {
  custom: {
    50: '#7d5fae',
    500: '#40208b',
    950: '#000000',
  },
}
SCSS
$custom: #40208b;
$custom-light: #7d5fae;
$custom-dark: #000000;
JSON
{
  "hex": "#40208b",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 139
  },
  "hsl": {
    "h": 257.944,
    "s": 62.573,
    "l": 33.529
  },
  "oklch": {
    "l": 0.36025,
    "c": 0.16372,
    "h": 289.1
  },
  "luminance": 0.03987
}

Semantic roles & 50–950 ramp

primary
#40208B
secondary
#99BA4D
accent
#E642B5
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40208B

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

Preview Lab → · Contrast checker → · Palette generator →

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