#400742#400742

#400742 is a dark, moderate purple. Relative luminance 0.016; OKLCH L 26.9% C 0.113 H 326.6°. Best body text is #FFFFFF at 15.83:1 contrast (WCAG AA passes).

Color values

HEX#400742
RGBrgb(64, 7, 66)
HSLhsl(298, 81%, 14%)
HSVhsv(298, 89%, 26%)
CMYKcmyk(3%, 89.4%, 0%, 74.1%)
CIE-LABlab(13.44, 34.09, -22.27)
CIE-LCHlch(13.44, 40.72, 326.85°)
OKLaboklab(26.88% 0.094 -0.0619)
OKLCHoklch(26.88% 0.113 326.6)
XYZxyz(3.1736, 1.6355, 5.3017)
Luminance0.0163 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#400742 #094207
analogous
#230742 #400742 #420727
triadic
#400742 #424007 #074240
tetradic
#400742 #422307 #094207 #072742
square
#400742 #422307 #094207 #072742
split-complementary
#400742 #274207 #074223
monochromatic
#1B031C #1B031C #400742 #760D79 #AB13B1

Accessibility & contrast

On white

15.83
#400742 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #400742
15.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##400742#FFFFFF#000000##FFFFFF
##4007421.0015.831.3315.83
#FFFFFF15.831.0021.001.00
#0000001.3321.001.0021.00
##FFFFFF15.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001E44
Deuteranopia (green-blind)
#162541
Tritanopia (blue-blind)
#421225
Achromatopsia (no color)
#222222

Design tokens & code

CSS
--color: #400742;
/* rgb */ color: rgb(64, 7, 66);
/* oklch */ color: oklch(26.9% 0.113 326.6);
Tailwind
colors: {
  custom: {
    50: '#774f77',
    500: '#400742',
    950: '#000000',
  },
}
SCSS
$custom: #400742;
$custom-light: #774f77;
$custom-dark: #000000;
JSON
{
  "hex": "#400742",
  "rgb": {
    "r": 64,
    "g": 7,
    "b": 66
  },
  "hsl": {
    "h": 297.966,
    "s": 80.822,
    "l": 14.314
  },
  "oklch": {
    "l": 0.26882,
    "c": 0.11256,
    "h": 326.6
  },
  "luminance": 0.01635
}

Semantic roles & 50–950 ramp

primary
#400742
secondary
#278124
accent
#F73137
background
#F7F4F7
surface
#EDE7ED
border
#C8C3C8
text
#090208
muted
#7B787B

Preview Lab

Preview with #400742

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

Preview Lab → · Contrast checker → · Palette generator →

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