#40207E#40207E

#40207E is a dark, vivid violet. Relative luminance 0.036; OKLCH L 34.8% C 0.148 H 292.6°. Best body text is #FFFFFF at 12.17:1 contrast (WCAG AA passes).

Color values

HEX#40207E
RGBrgb(64, 32, 126)
HSLhsl(260, 59%, 31%)
HSVhsv(260, 75%, 49%)
CMYKcmyk(49.2%, 74.6%, 0%, 50.6%)
CIE-LABlab(22.41, 37.83, -47.66)
CIE-LCHlch(22.41, 60.85, 308.44°)
OKLaboklab(34.79% 0.0568 -0.1366)
OKLCHoklch(34.79% 0.148 292.6)
XYZxyz(6.3957, 3.6292, 20.0981)
Luminance0.0363 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40207E #5E7E20
analogous
#202F7E #40207E #6F207E
triadic
#40207E #7E4020 #207E40
tetradic
#40207E #7E202F #5E7E20 #207E6F
square
#40207E #7E202F #5E7E20 #207E6F
split-complementary
#40207E #7E6F20 #2F7E20
monochromatic
#0E071C #27144D #40207E #592CAF #7648D0

Accessibility & contrast

On white

12.17
#40207E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#40207E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40207E
12.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40207E#FFFFFF#000000##FFFFFF
##40207E1.0012.171.7312.17
#FFFFFF12.171.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003781
Deuteranopia (green-blind)
#00347C
Tritanopia (blue-blind)
#2D384D
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40207e;
/* rgb */ color: rgb(64, 32, 126);
/* oklch */ color: oklch(34.8% 0.148 292.6);
Tailwind
colors: {
  custom: {
    50: '#7b5fa4',
    500: '#40207e',
    950: '#000000',
  },
}
SCSS
$custom: #40207e;
$custom-light: #7b5fa4;
$custom-dark: #000000;
JSON
{
  "hex": "#40207e",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 126
  },
  "hsl": {
    "h": 260.426,
    "s": 59.494,
    "l": 30.98
  },
  "oklch": {
    "l": 0.34789,
    "c": 0.14797,
    "h": 292.6
  },
  "luminance": 0.03629
}

Semantic roles & 50–950 ramp

primary
#40207E
secondary
#8DB149
accent
#E345AD
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40207E

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

Preview Lab → · Contrast checker → · Palette generator →

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