#400842#400842

#400842 is a dark, moderate purple. Relative luminance 0.017; OKLCH L 27.0% C 0.111 H 326.6°. Best body text is #FFFFFF at 15.77:1 contrast (WCAG AA passes).

Color values

HEX#400842
RGBrgb(64, 8, 66)
HSLhsl(298, 78%, 15%)
HSVhsv(298, 88%, 26%)
CMYKcmyk(3%, 87.9%, 0%, 74.1%)
CIE-LABlab(13.57, 33.71, -22.06)
CIE-LCHlch(13.57, 40.29, 326.80°)
OKLaboklab(26.97% 0.0929 -0.0613)
OKLCHoklch(26.97% 0.111 326.6)
XYZxyz(3.1845, 1.6572, 5.3053)
Luminance0.0166 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400842 #0A4208
analogous
#230842 #400842 #420827
triadic
#400842 #424008 #084240
tetradic
#400842 #422308 #0A4208 #082742
square
#400842 #422308 #0A4208 #082742
split-complementary
#400842 #274208 #084223
monochromatic
#1A031B #1A031B #400842 #750F79 #AA15AF

Accessibility & contrast

On white

15.77
#400842 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.33
#400842 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #400842
15.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400842#FFFFFF#000000##FFFFFF
##4008421.0015.771.3315.77
#FFFFFF15.771.0021.001.00
#0000001.3321.001.0021.00
##FFFFFF15.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001E44
Deuteranopia (green-blind)
#172541
Tritanopia (blue-blind)
#421325
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #400842;
/* rgb */ color: rgb(64, 8, 66);
/* oklch */ color: oklch(27.0% 0.111 326.6);
Tailwind
colors: {
  custom: {
    50: '#775077',
    500: '#400842',
    950: '#000000',
  },
}
SCSS
$custom: #400842;
$custom-light: #775077;
$custom-dark: #000000;
JSON
{
  "hex": "#400842",
  "rgb": {
    "r": 64,
    "g": 8,
    "b": 66
  },
  "hsl": {
    "h": 297.931,
    "s": 78.378,
    "l": 14.51
  },
  "oklch": {
    "l": 0.26974,
    "c": 0.11135,
    "h": 326.6
  },
  "luminance": 0.01657
}

Semantic roles & 50–950 ramp

primary
#400842
secondary
#298025
accent
#F5333A
background
#F7F4F7
surface
#EDE7ED
border
#C8C3C8
text
#090208
muted
#7B787B

Preview Lab

Preview with #400842

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

Preview Lab → · Contrast checker → · Palette generator →

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