#40209E#40209E

#40209E is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.9% C 0.186 H 284.9°. Best body text is #FFFFFF at 10.95:1 contrast (WCAG AA passes).

Color values

HEX#40209E
RGBrgb(64, 32, 158)
HSLhsl(255, 66%, 37%)
HSVhsv(255, 80%, 62%)
CMYKcmyk(59.5%, 79.7%, 0%, 38%)
CIE-LABlab(25.54, 47.16, -62.41)
CIE-LCHlch(25.54, 78.22, 307.08°)
OKLaboklab(37.94% 0.0479 -0.1798)
OKLCHoklch(37.94% 0.186 284.9)
XYZxyz(8.8005, 4.5911, 32.7636)
Luminance0.0459 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40209E #7E9E20
analogous
#203F9E #40209E #7F209E
triadic
#40209E #9E4020 #209E40
tetradic
#40209E #9E203F #7E9E20 #209E7F
square
#40209E #9E203F #7E9E20 #209E7F
split-complementary
#40209E #9E7F20 #3F9E20
monochromatic
#170B38 #2B166B #40209E #552AD1 #7C5BDE

Accessibility & contrast

On white

10.95
#40209E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#40209E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40209E
10.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40209E#FFFFFF#000000##FFFFFF
##40209E1.0010.951.9210.95
#FFFFFF10.951.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0040A1
Deuteranopia (green-blind)
#00399C
Tritanopia (blue-blind)
#07455F
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #40209e;
/* rgb */ color: rgb(64, 32, 158);
/* oklch */ color: oklch(37.9% 0.186 284.9);
Tailwind
colors: {
  custom: {
    50: '#8160bc',
    500: '#40209e',
    950: '#000000',
  },
}
SCSS
$custom: #40209e;
$custom-light: #8160bc;
$custom-dark: #000000;
JSON
{
  "hex": "#40209e",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 158
  },
  "hsl": {
    "h": 255.238,
    "s": 66.316,
    "l": 37.255
  },
  "oklch": {
    "l": 0.37936,
    "c": 0.18608,
    "h": 284.9
  },
  "luminance": 0.04592
}

Semantic roles & 50–950 ramp

primary
#40209E
secondary
#A7C258
accent
#E93FBE
background
#F8F5FB
surface
#F0EAF7
border
#CBC6D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #40209E

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

Preview Lab → · Contrast checker → · Palette generator →

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