#402E80#402E80

#402E80 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.1% C 0.132 H 288.3°. Best body text is #FFFFFF at 10.94:1 contrast (WCAG AA passes).

Color values

HEX#402E80
RGBrgb(64, 46, 128)
HSLhsl(253, 47%, 34%)
HSVhsv(253, 64%, 50%)
CMYKcmyk(50%, 64.1%, 0%, 49.8%)
CIE-LABlab(25.57, 30.27, -43.77)
CIE-LCHlch(25.57, 53.21, 304.67°)
OKLaboklab(37.12% 0.0415 -0.1252)
OKLCHoklch(37.12% 0.132 288.3)
XYZxyz(6.9865, 4.6022, 20.9381)
Luminance0.0460 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E80 #6E802E
analogous
#2E4580 #402E80 #692E80
triadic
#402E80 #80402E #2E8040
tetradic
#402E80 #802E45 #6E802E #2E8069
square
#402E80 #802E45 #6E802E #2E8069
split-complementary
#402E80 #80692E #45802E
monochromatic
#130E26 #291E53 #402E80 #573EAD #7862C7

Accessibility & contrast

On white

10.94
#402E80 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#402E80 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E80
10.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E80#FFFFFF#000000##FFFFFF
##402E801.0010.941.9210.94
#FFFFFF10.941.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E83
Deuteranopia (green-blind)
#003A7E
Tritanopia (blue-blind)
#2B4152
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #402e80;
/* rgb */ color: rgb(64, 46, 128);
/* oklch */ color: oklch(37.1% 0.132 288.3);
Tailwind
colors: {
  custom: {
    50: '#7b68a5',
    500: '#402e80',
    950: '#000000',
  },
}
SCSS
$custom: #402e80;
$custom-light: #7b68a5;
$custom-dark: #000000;
JSON
{
  "hex": "#402e80",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 128
  },
  "hsl": {
    "h": 253.171,
    "s": 47.126,
    "l": 34.118
  },
  "oklch": {
    "l": 0.37117,
    "c": 0.13196,
    "h": 288.3
  },
  "luminance": 0.04602
}

Semantic roles & 50–950 ramp

primary
#402E80
secondary
#9BAD5D
accent
#D751B9
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A060F
muted
#7C7A7F

Preview Lab

Preview with #402E80

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

Preview Lab → · Contrast checker → · Palette generator →

#402E80 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva