#402076#402076

#402076 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.1% C 0.138 H 295.1°. Best body text is #FFFFFF at 12.45:1 contrast (WCAG AA passes).

Color values

HEX#402076
RGBrgb(64, 32, 118)
HSLhsl(262, 57%, 29%)
HSVhsv(262, 73%, 46%)
CMYKcmyk(45.8%, 72.9%, 0%, 53.7%)
CIE-LABlab(21.69, 35.50, -43.73)
CIE-LCHlch(21.69, 56.33, 309.08°)
OKLaboklab(34.06% 0.0585 -0.1251)
OKLCHoklch(34.06% 0.138 295.1)
XYZxyz(5.9000, 3.4309, 17.4874)
Luminance0.0343 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402076 #567620
analogous
#202B76 #402076 #6B2076
triadic
#402076 #764020 #207640
tetradic
#402076 #76202B #567620 #20766B
square
#402076 #76202B #567620 #20766B
split-complementary
#402076 #766B20 #2B7620
monochromatic
#0D0718 #261346 #402076 #5A2DA6 #7744CC

Accessibility & contrast

On white

12.45
#402076 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#402076 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402076
12.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402076#FFFFFF#000000##FFFFFF
##4020761.0012.451.6912.45
#FFFFFF12.451.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003579
Deuteranopia (green-blind)
#003374
Tritanopia (blue-blind)
#313548
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #402076;
/* rgb */ color: rgb(64, 32, 118);
/* oklch */ color: oklch(34.1% 0.138 295.1);
Tailwind
colors: {
  custom: {
    50: '#7a5e9e',
    500: '#402076',
    950: '#000000',
  },
}
SCSS
$custom: #402076;
$custom-light: #7a5e9e;
$custom-dark: #000000;
JSON
{
  "hex": "#402076",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 118
  },
  "hsl": {
    "h": 262.326,
    "s": 57.333,
    "l": 29.412
  },
  "oklch": {
    "l": 0.34061,
    "c": 0.13809,
    "h": 295.1
  },
  "luminance": 0.03431
}

Semantic roles & 50–950 ramp

primary
#402076
secondary
#85A948
accent
#E147A8
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A040E
muted
#7C797E

Preview Lab

Preview with #402076

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

Preview Lab → · Contrast checker → · Palette generator →

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