#402F4E#402F4E

#402F4E is a dark, muted violet. Relative luminance 0.037; OKLCH L 33.8% C 0.057 H 308.7°. Best body text is #FFFFFF at 12.11:1 contrast (WCAG AA passes).

Color values

HEX#402F4E
RGBrgb(64, 47, 78)
HSLhsl(273, 25%, 25%)
HSVhsv(273, 40%, 31%)
CMYKcmyk(17.9%, 39.7%, 0%, 69.4%)
CIE-LABlab(22.56, 14.75, -16.14)
CIE-LCHlch(22.56, 21.87, 312.42°)
OKLaboklab(33.83% 0.0358 -0.0446)
OKLCHoklch(33.83% 0.057 308.7)
XYZxyz(4.5058, 3.6731, 7.6779)
Luminance0.0367 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402F4E #3D4E2F
analogous
#312F4E #402F4E #4E2F4D
triadic
#402F4E #4E402F #2F4E40
tetradic
#402F4E #4E312F #3D4E2F #2F4D4E
square
#402F4E #4E312F #3D4E2F #2F4D4E
split-complementary
#402F4E #4D4E2F #2F4E31
monochromatic
#100C13 #211828 #402F4E #5F4674 #7F5D9A

Accessibility & contrast

On white

12.11
#402F4E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#402F4E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402F4E
12.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402F4E#FFFFFF#000000##FFFFFF
##402F4E1.0012.111.7312.11
#FFFFFF12.111.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#29354F
Deuteranopia (green-blind)
#2D364D
Tritanopia (blue-blind)
#3E333B
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #402f4e;
/* rgb */ color: rgb(64, 47, 78);
/* oklch */ color: oklch(33.8% 0.057 308.7);
Tailwind
colors: {
  custom: {
    50: '#75677f',
    500: '#402f4e',
    950: '#000000',
  },
}
SCSS
$custom: #402f4e;
$custom-light: #75677f;
$custom-dark: #000000;
JSON
{
  "hex": "#402f4e",
  "rgb": {
    "r": 64,
    "g": 47,
    "b": 78
  },
  "hsl": {
    "h": 272.903,
    "s": 24.8,
    "l": 24.51
  },
  "oklch": {
    "l": 0.33829,
    "c": 0.05713,
    "h": 308.7
  },
  "luminance": 0.03673
}

Semantic roles & 50–950 ramp

primary
#402F4E
secondary
#6B7F5A
accent
#C16790
background
#F7F6F7
surface
#EDEBEE
border
#C8C6C9
text
#08060A
muted
#7B7A7C

Preview Lab

Preview with #402F4E

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

Preview Lab → · Contrast checker → · Palette generator →

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