#402872#402872

#402872 is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.0% C 0.122 H 294.1°. Best body text is #FFFFFF at 11.90:1 contrast (WCAG AA passes).

Color values

HEX#402872
RGBrgb(64, 40, 114)
HSLhsl(259, 48%, 30%)
HSVhsv(259, 65%, 45%)
CMYKcmyk(43.9%, 64.9%, 0%, 55.3%)
CIE-LABlab(23.08, 29.65, -38.92)
CIE-LCHlch(23.08, 48.93, 307.31°)
OKLaboklab(34.95% 0.0498 -0.111)
OKLCHoklch(34.95% 0.122 294.1)
XYZxyz(5.9096, 3.8223, 16.3427)
Luminance0.0382 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402872 #5A7228
analogous
#283572 #402872 #652872
triadic
#402872 #724028 #287240
tetradic
#402872 #722835 #5A7228 #287265
square
#402872 #722835 #5A7228 #287265
split-complementary
#402872 #726528 #357228
monochromatic
#0D0817 #271845 #402872 #59389F #7652C2

Accessibility & contrast

On white

11.90
#402872 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#402872 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402872
11.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402872#FFFFFF#000000##FFFFFF
##4028721.0011.901.7611.90
#FFFFFF11.901.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003874
Deuteranopia (green-blind)
#003670
Tritanopia (blue-blind)
#333949
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #402872;
/* rgb */ color: rgb(64, 40, 114);
/* oklch */ color: oklch(35.0% 0.122 294.1);
Tailwind
colors: {
  custom: {
    50: '#79639b',
    500: '#402872',
    950: '#000000',
  },
}
SCSS
$custom: #402872;
$custom-light: #79639b;
$custom-dark: #000000;
JSON
{
  "hex": "#402872",
  "rgb": {
    "r": 64,
    "g": 40,
    "b": 114
  },
  "hsl": {
    "h": 259.459,
    "s": 48.052,
    "l": 30.196
  },
  "oklch": {
    "l": 0.34953,
    "c": 0.12162,
    "h": 294.1
  },
  "luminance": 0.03822
}

Semantic roles & 50–950 ramp

primary
#402872
secondary
#89A452
accent
#D850AC
background
#F7F5F9
surface
#EEEAF2
border
#C9C6CC
text
#09050E
muted
#7B797E

Preview Lab

Preview with #402872

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

Preview Lab → · Contrast checker → · Palette generator →

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