#402E4C#402E4C

#402E4C is a dark, muted violet. Relative luminance 0.036; OKLCH L 33.5% C 0.056 H 311.1°. Best body text is #FFFFFF at 12.26:1 contrast (WCAG AA passes).

Color values

HEX#402E4C
RGBrgb(64, 46, 76)
HSLhsl(276, 25%, 24%)
HSVhsv(276, 39%, 30%)
CMYKcmyk(15.8%, 39.5%, 0%, 70.2%)
CIE-LABlab(22.18, 14.90, -15.39)
CIE-LCHlch(22.18, 21.42, 314.07°)
OKLaboklab(33.51% 0.0369 -0.0424)
OKLCHoklch(33.51% 0.056 311.1)
XYZxyz(4.3956, 3.5658, 7.2928)
Luminance0.0357 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402E4C #3A4C2E
analogous
#312E4C #402E4C #4C2E49
triadic
#402E4C #4C402E #2E4C40
tetradic
#402E4C #4C312E #3A4C2E #2E494C
square
#402E4C #4C312E #3A4C2E #2E494C
split-complementary
#402E4C #494C2E #2E4C31
monochromatic
#100C13 #201726 #402E4C #604572 #805C98

Accessibility & contrast

On white

12.26
#402E4C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#402E4C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402E4C
12.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402E4C#FFFFFF#000000##FFFFFF
##402E4C1.0012.261.7112.26
#FFFFFF12.261.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#29344D
Deuteranopia (green-blind)
#2D354B
Tritanopia (blue-blind)
#3F3239
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #402e4c;
/* rgb */ color: rgb(64, 46, 76);
/* oklch */ color: oklch(33.5% 0.056 311.1);
Tailwind
colors: {
  custom: {
    50: '#75677e',
    500: '#402e4c',
    950: '#000000',
  },
}
SCSS
$custom: #402e4c;
$custom-light: #75677e;
$custom-dark: #000000;
JSON
{
  "hex": "#402e4c",
  "rgb": {
    "r": 64,
    "g": 46,
    "b": 76
  },
  "hsl": {
    "h": 276,
    "s": 24.59,
    "l": 23.922
  },
  "oklch": {
    "l": 0.33508,
    "c": 0.05624,
    "h": 311.1
  },
  "luminance": 0.03566
}

Semantic roles & 50–950 ramp

primary
#402E4C
secondary
#677D59
accent
#C1678B
background
#F7F6F7
surface
#EDEBEE
border
#C8C6C9
text
#08060A
muted
#7B7A7C

Preview Lab

Preview with #402E4C

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

Preview Lab → · Contrast checker → · Palette generator →

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