#40207F#40207F

#40207F is a dark, vivid violet. Relative luminance 0.037; OKLCH L 34.9% C 0.149 H 292.3°. Best body text is #FFFFFF at 12.13:1 contrast (WCAG AA passes).

Color values

HEX#40207F
RGBrgb(64, 32, 127)
HSLhsl(260, 60%, 31%)
HSVhsv(260, 75%, 50%)
CMYKcmyk(49.6%, 74.8%, 0%, 50.2%)
CIE-LABlab(22.50, 38.12, -48.14)
CIE-LCHlch(22.50, 61.41, 308.37°)
OKLaboklab(34.88% 0.0565 -0.1381)
OKLCHoklch(34.88% 0.149 292.3)
XYZxyz(6.4606, 3.6551, 20.4397)
Luminance0.0365 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40207F #5F7F20
analogous
#202F7F #40207F #6F207F
triadic
#40207F #7F4020 #207F40
tetradic
#40207F #7F202F #5F7F20 #207F6F
square
#40207F #7F202F #5F7F20 #207F6F
split-complementary
#40207F #7F6F20 #2F7F20
monochromatic
#0F071D #27144E #40207F #592CB0 #7648D1

Accessibility & contrast

On white

12.13
#40207F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40207F
12.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40207F#FFFFFF#000000##FFFFFF
##40207F1.0012.131.7312.13
#FFFFFF12.131.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003782
Deuteranopia (green-blind)
#00347D
Tritanopia (blue-blind)
#2C394D
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40207f;
/* rgb */ color: rgb(64, 32, 127);
/* oklch */ color: oklch(34.9% 0.149 292.3);
Tailwind
colors: {
  custom: {
    50: '#7c5fa5',
    500: '#40207f',
    950: '#000000',
  },
}
SCSS
$custom: #40207f;
$custom-light: #7c5fa5;
$custom-dark: #000000;
JSON
{
  "hex": "#40207f",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 127
  },
  "hsl": {
    "h": 260.211,
    "s": 59.748,
    "l": 31.176
  },
  "oklch": {
    "l": 0.34881,
    "c": 0.14919,
    "h": 292.3
  },
  "luminance": 0.03655
}

Semantic roles & 50–950 ramp

primary
#40207F
secondary
#8FB249
accent
#E345AE
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40207F

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

Preview Lab → · Contrast checker → · Palette generator →

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