#401242#401242

#401242 is a dark, moderate purple. Relative luminance 0.019; OKLCH L 28.0% C 0.098 H 326.1°. Best body text is #FFFFFF at 15.18:1 contrast (WCAG AA passes).

Color values

HEX#401242
RGBrgb(64, 18, 66)
HSLhsl(298, 57%, 16%)
HSVhsv(298, 73%, 26%)
CMYKcmyk(3%, 72.7%, 0%, 74.1%)
CIE-LABlab(15.04, 29.55, -19.73)
CIE-LCHlch(15.04, 35.53, 326.27°)
OKLaboklab(28.03% 0.0813 -0.0547)
OKLCHoklch(28.03% 0.098 326.1)
XYZxyz(3.3140, 1.9162, 5.3485)
Luminance0.0192 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#401242 #144212
analogous
#281242 #401242 #42122C
triadic
#401242 #424012 #124240
tetradic
#401242 #422812 #144212 #122C42
square
#401242 #422812 #144212 #122C42
split-complementary
#401242 #2C4212 #124228
monochromatic
#170718 #170718 #401242 #6F1F72 #9D2CA2

Accessibility & contrast

On white

15.18
#401242 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #401242
15.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##401242#FFFFFF#000000##FFFFFF
##4012421.0015.181.3815.18
#FFFFFF15.181.0021.001.00
#0000001.3821.001.0021.00
##FFFFFF15.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0A2243
Deuteranopia (green-blind)
#1C2841
Tritanopia (blue-blind)
#421928
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #401242;
/* rgb */ color: rgb(64, 18, 66);
/* oklch */ color: oklch(28.0% 0.098 326.1);
Tailwind
colors: {
  custom: {
    50: '#775476',
    500: '#401242',
    950: '#000000',
  },
}
SCSS
$custom: #401242;
$custom-light: #775476;
$custom-dark: #000000;
JSON
{
  "hex": "#401242",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 66
  },
  "hsl": {
    "h": 297.5,
    "s": 57.143,
    "l": 16.471
  },
  "oklch": {
    "l": 0.28025,
    "c": 0.09796,
    "h": 326.1
  },
  "luminance": 0.01916
}

Semantic roles & 50–950 ramp

primary
#401242
secondary
#387B35
accent
#E0474E
background
#F7F5F7
surface
#EDE8ED
border
#C8C4C8
text
#090308
muted
#7B787B

Preview Lab

Preview with #401242

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

Preview Lab → · Contrast checker → · Palette generator →

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