#402D54#402D54

#402D54 is a dark, moderate violet. Relative luminance 0.036; OKLCH L 33.8% C 0.070 H 305.4°. Best body text is #FFFFFF at 12.20:1 contrast (WCAG AA passes).

Color values

HEX#402D54
RGBrgb(64, 45, 84)
HSLhsl(269, 30%, 25%)
HSVhsv(269, 46%, 33%)
CMYKcmyk(23.8%, 46.4%, 0%, 67.1%)
CIE-LABlab(22.33, 17.70, -20.51)
CIE-LCHlch(22.33, 27.09, 310.80°)
OKLaboklab(33.76% 0.0406 -0.0571)
OKLCHoklch(33.76% 0.07 305.4)
XYZxyz(4.6526, 3.6069, 8.8369)
Luminance0.0361 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D54 #41542D
analogous
#2D2D54 #402D54 #542D54
triadic
#402D54 #54402D #2D5440
tetradic
#402D54 #542D2D #41542D #2D5454
square
#402D54 #542D2D #41542D #2D5454
split-complementary
#402D54 #54542D #2D542D
monochromatic
#0F0B14 #22182C #402D54 #5E427C #7D58A4

Accessibility & contrast

On white

12.20
#402D54 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#402D54 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D54
12.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D54#FFFFFF#000000##FFFFFF
##402D541.0012.201.7212.20
#FFFFFF12.201.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#243555
Deuteranopia (green-blind)
#283553
Tritanopia (blue-blind)
#3D333C
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #402d54;
/* rgb */ color: rgb(64, 45, 84);
/* oklch */ color: oklch(33.8% 0.070 305.4);
Tailwind
colors: {
  custom: {
    50: '#766684',
    500: '#402d54',
    950: '#000000',
  },
}
SCSS
$custom: #402d54;
$custom-light: #766684;
$custom-dark: #000000;
JSON
{
  "hex": "#402d54",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 84
  },
  "hsl": {
    "h": 269.231,
    "s": 30.233,
    "l": 25.294
  },
  "oklch": {
    "l": 0.33757,
    "c": 0.07009,
    "h": 305.4
  },
  "luminance": 0.03607
}

Semantic roles & 50–950 ramp

primary
#402D54
secondary
#6F8657
accent
#C66195
background
#F7F6F8
surface
#EDEBEF
border
#C8C6CA
text
#08060B
muted
#7B7A7C

Preview Lab

Preview with #402D54

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

Preview Lab → · Contrast checker → · Palette generator →

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