#402D60#402D60

#402D60 is a dark, moderate violet. Relative luminance 0.038; OKLCH L 34.5% C 0.088 H 298.9°. Best body text is #FFFFFF at 11.92:1 contrast (WCAG AA passes).

Color values

HEX#402D60
RGBrgb(64, 45, 96)
HSLhsl(262, 36%, 28%)
HSVhsv(262, 53%, 38%)
CMYKcmyk(33.3%, 53.1%, 0%, 62.4%)
CIE-LABlab(23.04, 21.10, -27.31)
CIE-LCHlch(23.04, 34.51, 307.70°)
OKLaboklab(34.52% 0.0425 -0.0769)
OKLCHoklch(34.52% 0.088 298.9)
XYZxyz(5.1636, 3.8112, 11.5277)
Luminance0.0381 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D60 #4D602D
analogous
#2D3360 #402D60 #592D60
triadic
#402D60 #60402D #2D6040
tetradic
#402D60 #602D33 #4D602D #2D6059
square
#402D60 #602D33 #4D602D #2D6059
split-complementary
#402D60 #60592D #33602D
monochromatic
#0E0A15 #241936 #402D60 #5C418A #7857B0

Accessibility & contrast

On white

11.92
#402D60 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#402D60 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D60
11.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D60#FFFFFF#000000##FFFFFF
##402D601.0011.921.7611.92
#FFFFFF11.921.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1C3762
Deuteranopia (green-blind)
#20375F
Tritanopia (blue-blind)
#393742
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402d60;
/* rgb */ color: rgb(64, 45, 96);
/* oklch */ color: oklch(34.5% 0.088 298.9);
Tailwind
colors: {
  custom: {
    50: '#77668d',
    500: '#402d60',
    950: '#000000',
  },
}
SCSS
$custom: #402d60;
$custom-light: #77668d;
$custom-dark: #000000;
JSON
{
  "hex": "#402d60",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 96
  },
  "hsl": {
    "h": 262.353,
    "s": 36.17,
    "l": 27.647
  },
  "oklch": {
    "l": 0.34521,
    "c": 0.08788,
    "h": 298.9
  },
  "luminance": 0.03811
}

Semantic roles & 50–950 ramp

primary
#402D60
secondary
#7C9257
accent
#CC5CA2
background
#F7F6F8
surface
#EDEBF0
border
#C8C6CB
text
#09060C
muted
#7B7A7D

Preview Lab

Preview with #402D60

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

Preview Lab → · Contrast checker → · Palette generator →

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