#402F71#402F71

#402F71 is a dark, moderate violet. Relative luminance 0.043; OKLCH L 36.1% C 0.109 H 291.9°. Best body text is #FFFFFF at 11.27:1 contrast (WCAG AA passes).

Color values

HEX#402F71
RGBrgb(64, 47, 113)
HSLhsl(255, 41%, 31%)
HSVhsv(255, 58%, 44%)
CMYKcmyk(43.4%, 58.4%, 0%, 55.7%)
CIE-LABlab(24.69, 24.93, -35.68)
CIE-LCHlch(24.69, 43.52, 304.94°)
OKLaboklab(36.11% 0.0407 -0.1014)
OKLCHoklch(36.11% 0.109 291.9)
XYZxyz(6.1107, 4.3151, 16.1305)
Luminance0.0432 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F71 #60712F
analogous
#2F3F71 #402F71 #612F71
triadic
#402F71 #71402F #2F7140
tetradic
#402F71 #712F3F #60712F #2F7161
square
#402F71 #712F3F #60712F #2F7161
split-complementary
#402F71 #71612F #3F712F
monochromatic
#0F0B1B #281D46 #402F71 #58419C #765EBC

Accessibility & contrast

On white

11.27
#402F71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.86
#402F71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F71
11.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F71#FFFFFF#000000##FFFFFF
##402F711.0011.271.8611.27
#FFFFFF11.271.0021.001.00
#0000001.8621.001.0021.00
##FFFFFF11.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0D3C73
Deuteranopia (green-blind)
#113970
Tritanopia (blue-blind)
#333D4B
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #402f71;
/* rgb */ color: rgb(64, 47, 113);
/* oklch */ color: oklch(36.1% 0.109 291.9);
Tailwind
colors: {
  custom: {
    50: '#78689a',
    500: '#402f71',
    950: '#000000',
  },
}
SCSS
$custom: #402f71;
$custom-light: #78689a;
$custom-dark: #000000;
JSON
{
  "hex": "#402f71",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 113
  },
  "hsl": {
    "h": 255.455,
    "s": 41.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.36111,
    "c": 0.10932,
    "h": 291.9
  },
  "luminance": 0.04315
}

Semantic roles & 50–950 ramp

primary
#402F71
secondary
#90A25A
accent
#D157B2
background
#F7F6F9
surface
#EEEBF2
border
#C9C6CC
text
#09060E
muted
#7B7A7E

Preview Lab

Preview with #402F71

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

Preview Lab → · Contrast checker → · Palette generator →

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