#402F76#402F76

#402F76 is a dark, moderate violet. Relative luminance 0.044; OKLCH L 36.5% C 0.116 H 290.5°. Best body text is #FFFFFF at 11.13:1 contrast (WCAG AA passes).

Color values

HEX#402F76
RGBrgb(64, 47, 118)
HSLhsl(254, 43%, 32%)
HSVhsv(254, 60%, 46%)
CMYKcmyk(45.8%, 60.2%, 0%, 53.7%)
CIE-LABlab(25.05, 26.49, -38.29)
CIE-LCHlch(25.05, 46.56, 304.68°)
OKLaboklab(36.49% 0.0408 -0.1091)
OKLCHoklch(36.49% 0.116 290.5)
XYZxyz(6.4000, 4.4308, 17.6541)
Luminance0.0443 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F76 #65762F
analogous
#2F4276 #402F76 #632F76
triadic
#402F76 #76402F #2F7640
tetradic
#402F76 #762F42 #65762F #2F7663
square
#402F76 #762F42 #65762F #2F7663
split-complementary
#402F76 #76632F #42762F
monochromatic
#110C1E #281E4A #402F76 #5840A2 #7760C0

Accessibility & contrast

On white

11.13
#402F76 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.89
#402F76 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F76
11.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F76#FFFFFF#000000##FFFFFF
##402F761.0011.131.8911.13
#FFFFFF11.131.0021.001.00
#0000001.8921.001.0021.00
##FFFFFF11.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#023D78
Deuteranopia (green-blind)
#073A74
Tritanopia (blue-blind)
#303F4D
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402f76;
/* rgb */ color: rgb(64, 47, 118);
/* oklch */ color: oklch(36.5% 0.116 290.5);
Tailwind
colors: {
  custom: {
    50: '#79689e',
    500: '#402f76',
    950: '#000000',
  },
}
SCSS
$custom: #402f76;
$custom-light: #79689e;
$custom-dark: #000000;
JSON
{
  "hex": "#402f76",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 118
  },
  "hsl": {
    "h": 254.366,
    "s": 43.03,
    "l": 32.353
  },
  "oklch": {
    "l": 0.36492,
    "c": 0.11648,
    "h": 290.5
  },
  "luminance": 0.04431
}

Semantic roles & 50–950 ramp

primary
#402F76
secondary
#94A75A
accent
#D355B5
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09060E
muted
#7B7A7E

Preview Lab

Preview with #402F76

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

Preview Lab → · Contrast checker → · Palette generator →

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