#402080#402080

#402080 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.0% C 0.150 H 292.0°. Best body text is #FFFFFF at 12.09:1 contrast (WCAG AA passes).

Color values

HEX#402080
RGBrgb(64, 32, 128)
HSLhsl(260, 60%, 31%)
HSVhsv(260, 75%, 50%)
CMYKcmyk(50%, 75%, 0%, 49.8%)
CIE-LABlab(22.59, 38.41, -48.63)
CIE-LCHlch(22.59, 61.97, 308.31°)
OKLaboklab(34.98% 0.0563 -0.1395)
OKLCHoklch(34.98% 0.15 292)
XYZxyz(6.5261, 3.6813, 20.7846)
Luminance0.0368 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402080 #608020
analogous
#203080 #402080 #702080
triadic
#402080 #804020 #208040
tetradic
#402080 #802030 #608020 #208070
square
#402080 #802030 #608020 #208070
split-complementary
#402080 #807020 #308020
monochromatic
#0F081E #28144F #402080 #582CB1 #7649D1

Accessibility & contrast

On white

12.09
#402080 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#402080 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402080
12.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402080#FFFFFF#000000##FFFFFF
##4020801.0012.091.7412.09
#FFFFFF12.091.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003783
Deuteranopia (green-blind)
#00347E
Tritanopia (blue-blind)
#2C394E
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #402080;
/* rgb */ color: rgb(64, 32, 128);
/* oklch */ color: oklch(35.0% 0.150 292.0);
Tailwind
colors: {
  custom: {
    50: '#7c5fa6',
    500: '#402080',
    950: '#000000',
  },
}
SCSS
$custom: #402080;
$custom-light: #7c5fa6;
$custom-dark: #000000;
JSON
{
  "hex": "#402080",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 128
  },
  "hsl": {
    "h": 260,
    "s": 60,
    "l": 31.373
  },
  "oklch": {
    "l": 0.34975,
    "c": 0.15042,
    "h": 292
  },
  "luminance": 0.03682
}

Semantic roles & 50–950 ramp

primary
#402080
secondary
#90B349
accent
#E345AE
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #402080

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

Preview Lab → · Contrast checker → · Palette generator →

#402080 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva