#402842#402842

#402842 is a dark, muted purple. Relative luminance 0.030; OKLCH L 31.7% C 0.055 H 324.1°. Best body text is #FFFFFF at 13.12:1 contrast (WCAG AA passes).

Color values

HEX#402842
RGBrgb(64, 40, 66)
HSLhsl(295, 25%, 21%)
HSVhsv(295, 39%, 26%)
CMYKcmyk(3%, 39.4%, 0%, 74.1%)
CIE-LABlab(20.05, 16.43, -11.91)
CIE-LCHlch(20.05, 20.29, 324.06°)
OKLaboklab(31.73% 0.0448 -0.0324)
OKLCHoklch(31.73% 0.055 324.1)
XYZxyz(3.8564, 3.0011, 5.5293)
Luminance0.0300 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402842 #2A4228
analogous
#332842 #402842 #422837
triadic
#402842 #424028 #284240
tetradic
#402842 #423328 #2A4228 #283742
square
#402842 #423328 #2A4228 #283742
split-complementary
#402842 #374228 #284233
monochromatic
#120C13 #1B111C #402842 #653F68 #8A568E

Accessibility & contrast

On white

13.12
#402842 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#402842 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402842
13.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402842#FFFFFF#000000##FFFFFF
##4028421.0013.121.6013.12
#FFFFFF13.121.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#262F43
Deuteranopia (green-blind)
#2C3141
Tritanopia (blue-blind)
#412B32
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #402842;
/* rgb */ color: rgb(64, 40, 66);
/* oklch */ color: oklch(31.7% 0.055 324.1);
Tailwind
colors: {
  custom: {
    50: '#756276',
    500: '#402842',
    950: '#000000',
  },
}
SCSS
$custom: #402842;
$custom-light: #756276;
$custom-dark: #000000;
JSON
{
  "hex": "#402842",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 66
  },
  "hsl": {
    "h": 295.385,
    "s": 24.528,
    "l": 20.784
  },
  "oklch": {
    "l": 0.31733,
    "c": 0.05533,
    "h": 324.1
  },
  "luminance": 0.03001
}

Semantic roles & 50–950 ramp

primary
#402842
secondary
#557452
accent
#C1676E
background
#F7F5F7
surface
#EDEAED
border
#C8C6C8
text
#080508
muted
#7B797B

Preview Lab

Preview with #402842

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

Preview Lab → · Contrast checker → · Palette generator →

#402842 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva