#402C4E#402C4E

#402C4E is a dark, moderate violet. Relative luminance 0.034; OKLCH L 33.2% C 0.063 H 310.3°. Best body text is #FFFFFF at 12.44:1 contrast (WCAG AA passes).

Color values

HEX#402C4E
RGBrgb(64, 44, 78)
HSLhsl(275, 28%, 24%)
HSVhsv(275, 44%, 31%)
CMYKcmyk(17.9%, 43.6%, 0%, 69.4%)
CIE-LABlab(21.73, 16.76, -17.43)
CIE-LCHlch(21.73, 24.18, 313.87°)
OKLaboklab(33.2% 0.041 -0.0482)
OKLCHoklch(33.2% 0.063 310.3)
XYZxyz(4.3899, 3.4415, 7.6393)
Luminance0.0344 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402C4E #3A4E2C
analogous
#2F2C4E #402C4E #4E2C4B
triadic
#402C4E #4E402C #2C4E40
tetradic
#402C4E #4E2F2C #3A4E2C #2C4B4E
square
#402C4E #4E2F2C #3A4E2C #2C4B4E
split-complementary
#402C4E #4B4E2C #2C4E2F
monochromatic
#100B14 #201627 #402C4E #604275 #80589C

Accessibility & contrast

On white

12.44
#402C4E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#402C4E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402C4E
12.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402C4E#FFFFFF#000000##FFFFFF
##402C4E1.0012.441.6912.44
#FFFFFF12.441.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#25334F
Deuteranopia (green-blind)
#2A344D
Tritanopia (blue-blind)
#3E3139
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #402c4e;
/* rgb */ color: rgb(64, 44, 78);
/* oklch */ color: oklch(33.2% 0.063 310.3);
Tailwind
colors: {
  custom: {
    50: '#75657f',
    500: '#402c4e',
    950: '#000000',
  },
}
SCSS
$custom: #402c4e;
$custom-light: #75657f;
$custom-dark: #000000;
JSON
{
  "hex": "#402c4e",
  "rgb": {
    "r": 64,
    "g": 44,
    "b": 78
  },
  "hsl": {
    "h": 275.294,
    "s": 27.869,
    "l": 23.922
  },
  "oklch": {
    "l": 0.33202,
    "c": 0.06329,
    "h": 310.3
  },
  "luminance": 0.03441
}

Semantic roles & 50–950 ramp

primary
#402C4E
secondary
#678056
accent
#C4648B
background
#F7F6F7
surface
#EDEBEE
border
#C8C6C9
text
#08050A
muted
#7B7A7C

Preview Lab

Preview with #402C4E

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

Preview Lab → · Contrast checker → · Palette generator →

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