#401240#401240

#401240 is a dark, moderate purple. Relative luminance 0.019; OKLCH L 27.9% C 0.096 H 327.8°. Best body text is #FFFFFF at 15.23:1 contrast (WCAG AA passes).

Color values

HEX#401240
RGBrgb(64, 18, 64)
HSLhsl(300, 56%, 16%)
HSVhsv(300, 72%, 25%)
CMYKcmyk(0%, 71.9%, 0%, 74.9%)
CIE-LABlab(14.92, 29.13, -18.52)
CIE-LCHlch(14.92, 34.52, 327.55°)
OKLaboklab(27.89% 0.0812 -0.0512)
OKLCHoklch(27.89% 0.096 327.8)
XYZxyz(3.2560, 1.8930, 5.0434)
Luminance0.0189 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401240 #124012
analogous
#291240 #401240 #401229
triadic
#401240 #404012 #124040
tetradic
#401240 #402912 #124012 #122940
square
#401240 #402912 #124012 #122940
split-complementary
#401240 #294012 #124029
monochromatic
#180718 #180718 #401240 #701F70 #A02DA0

Accessibility & contrast

On white

15.23
#401240 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.38
#401240 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #401240
15.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401240#FFFFFF#000000##FFFFFF
##4012401.0015.231.3815.23
#FFFFFF15.231.0021.001.00
#0000001.3821.001.0021.00
##FFFFFF15.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0C2241
Deuteranopia (green-blind)
#1D283F
Tritanopia (blue-blind)
#421827
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #401240;
/* rgb */ color: rgb(64, 18, 64);
/* oklch */ color: oklch(27.9% 0.096 327.8);
Tailwind
colors: {
  custom: {
    50: '#775475',
    500: '#401240',
    950: '#000000',
  },
}
SCSS
$custom: #401240;
$custom-light: #775475;
$custom-dark: #000000;
JSON
{
  "hex": "#401240",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 64
  },
  "hsl": {
    "h": 300,
    "s": 56.098,
    "l": 16.078
  },
  "oklch": {
    "l": 0.27893,
    "c": 0.09595,
    "h": 327.8
  },
  "luminance": 0.01893
}

Semantic roles & 50–950 ramp

primary
#401240
secondary
#357935
accent
#DF4848
background
#F7F5F7
surface
#EDE8ED
border
#C8C4C8
text
#090308
muted
#7B787B

Preview Lab

Preview with #401240

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

Preview Lab → · Contrast checker → · Palette generator →

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