#40208A#40208A

#40208A is a dark, vivid violet. Relative luminance 0.040; OKLCH L 35.9% C 0.163 H 289.3°. Best body text is #FFFFFF at 11.72:1 contrast (WCAG AA passes).

Color values

HEX#40208A
RGBrgb(64, 32, 138)
HSLhsl(258, 62%, 33%)
HSVhsv(258, 77%, 54%)
CMYKcmyk(53.6%, 76.8%, 0%, 45.9%)
CIE-LABlab(23.53, 41.33, -53.36)
CIE-LCHlch(23.53, 67.50, 307.76°)
OKLaboklab(35.93% 0.0537 -0.1534)
OKLCHoklch(35.93% 0.163 289.3)
XYZxyz(7.2170, 3.9577, 24.4235)
Luminance0.0396 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40208A #6A8A20
analogous
#20358A #40208A #75208A
triadic
#40208A #8A4020 #208A40
tetradic
#40208A #8A2035 #6A8A20 #208A75
square
#40208A #8A2035 #6A8A20 #208A75
split-complementary
#40208A #8A7520 #358A20
monochromatic
#120927 #291458 #40208A #572CBC #774ED6

Accessibility & contrast

On white

11.72
#40208A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#40208A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40208A
11.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40208A#FFFFFF#000000##FFFFFF
##40208A1.0011.721.7911.72
#FFFFFF11.721.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8D
Deuteranopia (green-blind)
#003588
Tritanopia (blue-blind)
#243D53
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #40208a;
/* rgb */ color: rgb(64, 32, 138);
/* oklch */ color: oklch(35.9% 0.163 289.3);
Tailwind
colors: {
  custom: {
    50: '#7d5fad',
    500: '#40208a',
    950: '#000000',
  },
}
SCSS
$custom: #40208a;
$custom-light: #7d5fad;
$custom-dark: #000000;
JSON
{
  "hex": "#40208a",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 138
  },
  "hsl": {
    "h": 258.113,
    "s": 62.353,
    "l": 33.333
  },
  "oklch": {
    "l": 0.35928,
    "c": 0.16252,
    "h": 289.3
  },
  "luminance": 0.03958
}

Semantic roles & 50–950 ramp

primary
#40208A
secondary
#98B94D
accent
#E542B4
background
#F8F5FA
surface
#EFE9F4
border
#CAC5CE
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40208A

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

Preview Lab → · Contrast checker → · Palette generator →

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