#40124D#40124D

#40124D is a dark, moderate purple. Relative luminance 0.021; OKLCH L 28.8% C 0.109 H 317.9°. Best body text is #FFFFFF at 14.88:1 contrast (WCAG AA passes).

Color values

HEX#40124D
RGBrgb(64, 18, 77)
HSLhsl(287, 62%, 19%)
HSVhsv(287, 77%, 30%)
CMYKcmyk(16.9%, 76.6%, 0%, 69.8%)
CIE-LABlab(15.79, 31.96, -26.15)
CIE-LCHlch(15.79, 41.30, 320.71°)
OKLaboklab(28.81% 0.0811 -0.0734)
OKLCHoklch(28.81% 0.109 317.9)
XYZxyz(3.6700, 2.0586, 7.2238)
Luminance0.0206 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40124D #1F4D12
analogous
#22124D #40124D #4D123C
triadic
#40124D #4D4012 #124D40
tetradic
#40124D #4D2212 #1F4D12 #123C4D
square
#40124D #4D2212 #1F4D12 #123C4D
split-complementary
#40124D #3C4D12 #124D22
monochromatic
#150619 #17061B #40124D #691E7F #9229B0

Accessibility & contrast

On white

14.88
#40124D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.41
#40124D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40124D
14.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40124D#FFFFFF#000000##FFFFFF
##40124D1.0014.881.4114.88
#FFFFFF14.881.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00244F
Deuteranopia (green-blind)
#14294C
Tritanopia (blue-blind)
#401D2E
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #40124d;
/* rgb */ color: rgb(64, 18, 77);
/* oklch */ color: oklch(28.8% 0.109 317.9);
Tailwind
colors: {
  custom: {
    50: '#77557f',
    500: '#40124d',
    950: '#000000',
  },
}
SCSS
$custom: #40124d;
$custom-light: #77557f;
$custom-dark: #000000;
JSON
{
  "hex": "#40124d",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 77
  },
  "hsl": {
    "h": 286.78,
    "s": 62.105,
    "l": 18.627
  },
  "oklch": {
    "l": 0.28806,
    "c": 0.10938,
    "h": 317.9
  },
  "luminance": 0.02058
}

Semantic roles & 50–950 ramp

primary
#40124D
secondary
#478635
accent
#E54366
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40124D

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

Preview Lab → · Contrast checker → · Palette generator →

#40124D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva