#40209D#40209D

#40209D is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.8% C 0.185 H 285.1°. Best body text is #FFFFFF at 10.99:1 contrast (WCAG AA passes).

Color values

HEX#40209D
RGBrgb(64, 32, 157)
HSLhsl(255, 66%, 37%)
HSVhsv(255, 80%, 62%)
CMYKcmyk(59.2%, 79.6%, 0%, 38.4%)
CIE-LABlab(25.43, 46.87, -61.97)
CIE-LCHlch(25.43, 77.70, 307.11°)
OKLaboklab(37.83% 0.0482 -0.1785)
OKLCHoklch(37.83% 0.185 285.1)
XYZxyz(8.7148, 4.5568, 32.3121)
Luminance0.0456 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40209D #7D9D20
analogous
#203F9D #40209D #7F209D
triadic
#40209D #9D4020 #209D40
tetradic
#40209D #9D203F #7D9D20 #209D7F
square
#40209D #9D203F #7D9D20 #209D7F
split-complementary
#40209D #9D7F20 #3F9D20
monochromatic
#170B37 #2B166A #40209D #552AD0 #7C5ADD

Accessibility & contrast

On white

10.99
#40209D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#40209D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40209D
10.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40209D#FFFFFF#000000##FFFFFF
##40209D1.0010.991.9110.99
#FFFFFF10.991.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0040A0
Deuteranopia (green-blind)
#00389B
Tritanopia (blue-blind)
#0A455E
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40209d;
/* rgb */ color: rgb(64, 32, 157);
/* oklch */ color: oklch(37.8% 0.185 285.1);
Tailwind
colors: {
  custom: {
    50: '#8160bb',
    500: '#40209d',
    950: '#000000',
  },
}
SCSS
$custom: #40209d;
$custom-light: #8160bb;
$custom-dark: #000000;
JSON
{
  "hex": "#40209d",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 157
  },
  "hsl": {
    "h": 255.36,
    "s": 66.138,
    "l": 37.059
  },
  "oklch": {
    "l": 0.37833,
    "c": 0.18493,
    "h": 285.1
  },
  "luminance": 0.04557
}

Semantic roles & 50–950 ramp

primary
#40209D
secondary
#A6C157
accent
#E93FBD
background
#F8F5FB
surface
#F0EAF6
border
#CBC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #40209D

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

Preview Lab → · Contrast checker → · Palette generator →

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