#40207A#40207A

#40207A is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.4% C 0.143 H 293.8°. Best body text is #FFFFFF at 12.31:1 contrast (WCAG AA passes).

Color values

HEX#40207A
RGBrgb(64, 32, 122)
HSLhsl(261, 58%, 30%)
HSVhsv(261, 74%, 48%)
CMYKcmyk(47.5%, 73.8%, 0%, 52.2%)
CIE-LABlab(22.05, 36.66, -45.71)
CIE-LCHlch(22.05, 58.59, 308.74°)
OKLaboklab(34.42% 0.0577 -0.1309)
OKLCHoklch(34.42% 0.143 293.8)
XYZxyz(6.1428, 3.5280, 18.7659)
Luminance0.0353 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40207A #5A7A20
analogous
#202D7A #40207A #6D207A
triadic
#40207A #7A4020 #207A40
tetradic
#40207A #7A202D #5A7A20 #207A6D
square
#40207A #7A202D #5A7A20 #207A6D
split-complementary
#40207A #7A6D20 #2D7A20
monochromatic
#0D0719 #27134A #40207A #592DAA #7646CE

Accessibility & contrast

On white

12.31
#40207A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#40207A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40207A
12.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40207A#FFFFFF#000000##FFFFFF
##40207A1.0012.311.7112.31
#FFFFFF12.311.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00367D
Deuteranopia (green-blind)
#003378
Tritanopia (blue-blind)
#2F374A
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #40207a;
/* rgb */ color: rgb(64, 32, 122);
/* oklch */ color: oklch(34.4% 0.143 293.8);
Tailwind
colors: {
  custom: {
    50: '#7b5ea1',
    500: '#40207a',
    950: '#000000',
  },
}
SCSS
$custom: #40207a;
$custom-light: #7b5ea1;
$custom-dark: #000000;
JSON
{
  "hex": "#40207a",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 122
  },
  "hsl": {
    "h": 261.333,
    "s": 58.442,
    "l": 30.196
  },
  "oklch": {
    "l": 0.34421,
    "c": 0.14305,
    "h": 293.8
  },
  "luminance": 0.03528
}

Semantic roles & 50–950 ramp

primary
#40207A
secondary
#89AD49
accent
#E246AA
background
#F7F5FA
surface
#EEE9F3
border
#C9C5CD
text
#0A040F
muted
#7C797F

Preview Lab

Preview with #40207A

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

Preview Lab → · Contrast checker → · Palette generator →

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