#40124C#40124C

#40124C is a dark, moderate purple. Relative luminance 0.020; OKLCH L 28.7% C 0.108 H 318.5°. Best body text is #FFFFFF at 14.91:1 contrast (WCAG AA passes).

Color values

HEX#40124C
RGBrgb(64, 18, 76)
HSLhsl(288, 62%, 18%)
HSVhsv(288, 76%, 30%)
CMYKcmyk(15.8%, 76.3%, 0%, 70.2%)
CIE-LABlab(15.72, 31.74, -25.58)
CIE-LCHlch(15.72, 40.76, 321.13°)
OKLaboklab(28.73% 0.0812 -0.0717)
OKLCHoklch(28.73% 0.108 318.5)
XYZxyz(3.6350, 2.0446, 7.0392)
Luminance0.0204 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40124C #1E4C12
analogous
#23124C #40124C #4C123B
triadic
#40124C #4C4012 #124C40
tetradic
#40124C #4C2312 #1E4C12 #123B4C
square
#40124C #4C2312 #1E4C12 #123B4C
split-complementary
#40124C #3B4C12 #124C23
monochromatic
#150619 #16061B #40124C #6A1E7D #9329AF

Accessibility & contrast

On white

14.91
#40124C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40124C
14.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40124C#FFFFFF#000000##FFFFFF
##40124C1.0014.911.4114.91
#FFFFFF14.911.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00244E
Deuteranopia (green-blind)
#15294B
Tritanopia (blue-blind)
#401D2D
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #40124c;
/* rgb */ color: rgb(64, 18, 76);
/* oklch */ color: oklch(28.7% 0.108 318.5);
Tailwind
colors: {
  custom: {
    50: '#77557e',
    500: '#40124c',
    950: '#000000',
  },
}
SCSS
$custom: #40124c;
$custom-light: #77557e;
$custom-dark: #000000;
JSON
{
  "hex": "#40124c",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 76
  },
  "hsl": {
    "h": 287.586,
    "s": 61.702,
    "l": 18.431
  },
  "oklch": {
    "l": 0.28731,
    "c": 0.10832,
    "h": 318.5
  },
  "luminance": 0.02044
}

Semantic roles & 50–950 ramp

primary
#40124C
secondary
#458535
accent
#E54364
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40124C

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

Preview Lab → · Contrast checker → · Palette generator →

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