#40209F#40209F

#40209F is a dark, vivid violet. Relative luminance 0.046; OKLCH L 38.0% C 0.187 H 284.7°. Best body text is #FFFFFF at 10.91:1 contrast (WCAG AA passes).

Color values

HEX#40209F
RGBrgb(64, 32, 159)
HSLhsl(255, 66%, 37%)
HSVhsv(255, 80%, 62%)
CMYKcmyk(59.7%, 79.9%, 0%, 37.6%)
CIE-LABlab(25.64, 47.45, -62.84)
CIE-LCHlch(25.64, 78.75, 307.06°)
OKLaboklab(38.04% 0.0476 -0.1811)
OKLCHoklch(38.04% 0.187 284.7)
XYZxyz(8.8870, 4.6257, 33.2187)
Luminance0.0463 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40209F #7F9F20
analogous
#20409F #40209F #7F209F
triadic
#40209F #9F4020 #209F40
tetradic
#40209F #9F2040 #7F9F20 #209F7F
square
#40209F #9F2040 #7F9F20 #209F7F
split-complementary
#40209F #9F7F20 #409F20
monochromatic
#170B39 #2B166C #40209F #552AD2 #7C5BDE

Accessibility & contrast

On white

10.91
#40209F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#40209F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40209F
10.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40209F#FFFFFF#000000##FFFFFF
##40209F1.0010.911.9310.91
#FFFFFF10.911.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0040A3
Deuteranopia (green-blind)
#00399D
Tritanopia (blue-blind)
#04465F
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40209f;
/* rgb */ color: rgb(64, 32, 159);
/* oklch */ color: oklch(38.0% 0.187 284.7);
Tailwind
colors: {
  custom: {
    50: '#8160bd',
    500: '#40209f',
    950: '#000000',
  },
}
SCSS
$custom: #40209f;
$custom-light: #8160bd;
$custom-dark: #000000;
JSON
{
  "hex": "#40209f",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 159
  },
  "hsl": {
    "h": 255.118,
    "s": 66.492,
    "l": 37.451
  },
  "oklch": {
    "l": 0.38039,
    "c": 0.18724,
    "h": 284.7
  },
  "luminance": 0.04626
}

Semantic roles & 50–950 ramp

primary
#40209F
secondary
#A8C259
accent
#E93EBE
background
#F8F5FB
surface
#F0EAF7
border
#CBC6D0
text
#0C0512
muted
#7D7981

Preview Lab

Preview with #40209F

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

Preview Lab → · Contrast checker → · Palette generator →

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