#402D4E#402D4E

#402D4E is a dark, moderate violet. Relative luminance 0.035; OKLCH L 33.4% C 0.061 H 309.8°. Best body text is #FFFFFF at 12.33:1 contrast (WCAG AA passes).

Color values

HEX#402D4E
RGBrgb(64, 45, 78)
HSLhsl(275, 27%, 24%)
HSVhsv(275, 42%, 31%)
CMYKcmyk(17.9%, 42.3%, 0%, 69.4%)
CIE-LABlab(22.01, 16.09, -17.01)
CIE-LCHlch(22.01, 23.41, 313.41°)
OKLaboklab(33.41% 0.0392 -0.047)
OKLCHoklch(33.41% 0.061 309.8)
XYZxyz(4.4276, 3.5169, 7.6518)
Luminance0.0352 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402D4E #3B4E2D
analogous
#302D4E #402D4E #4E2D4C
triadic
#402D4E #4E402D #2D4E40
tetradic
#402D4E #4E302D #3B4E2D #2D4C4E
square
#402D4E #4E302D #3B4E2D #2D4C4E
split-complementary
#402D4E #4C4E2D #2D4E30
monochromatic
#100B13 #201727 #402D4E #604375 #805A9C

Accessibility & contrast

On white

12.33
#402D4E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#402D4E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402D4E
12.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402D4E#FFFFFF#000000##FFFFFF
##402D4E1.0012.331.7012.33
#FFFFFF12.331.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#26344F
Deuteranopia (green-blind)
#2B354D
Tritanopia (blue-blind)
#3E3239
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #402d4e;
/* rgb */ color: rgb(64, 45, 78);
/* oklch */ color: oklch(33.4% 0.061 309.8);
Tailwind
colors: {
  custom: {
    50: '#75667f',
    500: '#402d4e',
    950: '#000000',
  },
}
SCSS
$custom: #402d4e;
$custom-light: #75667f;
$custom-dark: #000000;
JSON
{
  "hex": "#402d4e",
  "rgb": {
    "r": 64,
    "g": 45,
    "b": 78
  },
  "hsl": {
    "h": 274.545,
    "s": 26.829,
    "l": 24.118
  },
  "oklch": {
    "l": 0.33409,
    "c": 0.06124,
    "h": 309.8
  },
  "luminance": 0.03517
}

Semantic roles & 50–950 ramp

primary
#402D4E
secondary
#688057
accent
#C3658D
background
#F7F6F7
surface
#EDEBEE
border
#C8C6C9
text
#08060A
muted
#7B7A7C

Preview Lab

Preview with #402D4E

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

Preview Lab → · Contrast checker → · Palette generator →

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