#402B4E#402B4E

#402B4E is a dark, moderate violet. Relative luminance 0.034; OKLCH L 33.0% C 0.065 H 310.8°. Best body text is #FFFFFF at 12.55:1 contrast (WCAG AA passes).

Color values

HEX#402B4E
RGBrgb(64, 43, 78)
HSLhsl(276, 29%, 24%)
HSVhsv(276, 45%, 31%)
CMYKcmyk(17.9%, 44.9%, 0%, 69.4%)
CIE-LABlab(21.46, 17.42, -17.86)
CIE-LCHlch(21.46, 24.95, 314.29°)
OKLaboklab(33% 0.0427 -0.0494)
OKLCHoklch(33% 0.065 310.8)
XYZxyz(4.3531, 3.3679, 7.6270)
Luminance0.0337 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402B4E #394E2B
analogous
#2E2B4E #402B4E #4E2B4A
triadic
#402B4E #4E402B #2B4E40
tetradic
#402B4E #4E2E2B #394E2B #2B4A4E
square
#402B4E #4E2E2B #394E2B #2B4A4E
split-complementary
#402B4E #4A4E2B #2B4E2E
monochromatic
#100B14 #201527 #402B4E #604175 #81569D

Accessibility & contrast

On white

12.55
#402B4E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#402B4E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402B4E
12.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402B4E#FFFFFF#000000##FFFFFF
##402B4E1.0012.551.6712.55
#FFFFFF12.551.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#24324F
Deuteranopia (green-blind)
#29344D
Tritanopia (blue-blind)
#3E3038
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #402b4e;
/* rgb */ color: rgb(64, 43, 78);
/* oklch */ color: oklch(33.0% 0.065 310.8);
Tailwind
colors: {
  custom: {
    50: '#75647f',
    500: '#402b4e',
    950: '#000000',
  },
}
SCSS
$custom: #402b4e;
$custom-light: #75647f;
$custom-dark: #000000;
JSON
{
  "hex": "#402b4e",
  "rgb": {
    "r": 64,
    "g": 43,
    "b": 78
  },
  "hsl": {
    "h": 276,
    "s": 28.926,
    "l": 23.725
  },
  "oklch": {
    "l": 0.32998,
    "c": 0.06533,
    "h": 310.8
  },
  "luminance": 0.03368
}

Semantic roles & 50–950 ramp

primary
#402B4E
secondary
#668055
accent
#C5638A
background
#F7F6F7
surface
#EDEBEE
border
#C8C6C9
text
#08050A
muted
#7B7A7C

Preview Lab

Preview with #402B4E

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

Preview Lab → · Contrast checker → · Palette generator →

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