#40208C#40208C

#40208C is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.1% C 0.165 H 288.8°. Best body text is #FFFFFF at 11.65:1 contrast (WCAG AA passes).

Color values

HEX#40208C
RGBrgb(64, 32, 140)
HSLhsl(258, 63%, 34%)
HSVhsv(258, 77%, 55%)
CMYKcmyk(54.3%, 77.1%, 0%, 45.1%)
CIE-LABlab(23.72, 41.92, -54.29)
CIE-LCHlch(23.72, 68.59, 307.67°)
OKLaboklab(36.12% 0.0532 -0.1561)
OKLCHoklch(36.12% 0.165 288.8)
XYZxyz(7.3631, 4.0161, 25.1931)
Luminance0.0402 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40208C #6C8C20
analogous
#20368C #40208C #76208C
triadic
#40208C #8C4020 #208C40
tetradic
#40208C #8C2036 #6C8C20 #208C76
square
#40208C #8C2036 #6C8C20 #208C76
split-complementary
#40208C #8C7620 #368C20
monochromatic
#120928 #29155A #40208C #572BBE #7850D7

Accessibility & contrast

On white

11.65
#40208C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#40208C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40208C
11.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40208C#FFFFFF#000000##FFFFFF
##40208C1.0011.651.8011.65
#FFFFFF11.651.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8F
Deuteranopia (green-blind)
#00368A
Tritanopia (blue-blind)
#223E55
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #40208c;
/* rgb */ color: rgb(64, 32, 140);
/* oklch */ color: oklch(36.1% 0.165 288.8);
Tailwind
colors: {
  custom: {
    50: '#7e5faf',
    500: '#40208c',
    950: '#000000',
  },
}
SCSS
$custom: #40208c;
$custom-light: #7e5faf;
$custom-dark: #000000;
JSON
{
  "hex": "#40208c",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 140
  },
  "hsl": {
    "h": 257.778,
    "s": 62.791,
    "l": 33.725
  },
  "oklch": {
    "l": 0.36123,
    "c": 0.16491,
    "h": 288.8
  },
  "luminance": 0.04016
}

Semantic roles & 50–950 ramp

primary
#40208C
secondary
#9ABA4E
accent
#E642B5
background
#F8F5FA
surface
#EFE9F5
border
#CAC5CF
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40208C

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

Preview Lab → · Contrast checker → · Palette generator →

#40208C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva