#40124F#40124F

#40124F is a dark, moderate purple. Relative luminance 0.021; OKLCH L 29.0% C 0.112 H 316.5°. Best body text is #FFFFFF at 14.82:1 contrast (WCAG AA passes).

Color values

HEX#40124F
RGBrgb(64, 18, 79)
HSLhsl(285, 63%, 19%)
HSVhsv(285, 77%, 31%)
CMYKcmyk(19%, 77.2%, 0%, 69%)
CIE-LABlab(15.94, 32.42, -27.29)
CIE-LCHlch(15.94, 42.38, 319.92°)
OKLaboklab(28.96% 0.0809 -0.0767)
OKLCHoklch(28.96% 0.112 316.5)
XYZxyz(3.7417, 2.0873, 7.6014)
Luminance0.0209 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40124F #214F12
analogous
#22124F #40124F #4F1240
triadic
#40124F #4F4012 #124F40
tetradic
#40124F #4F2212 #214F12 #12404F
square
#40124F #4F2212 #214F12 #12404F
split-complementary
#40124F #404F12 #124F22
monochromatic
#140619 #18071D #40124F #681D81 #9129B3

Accessibility & contrast

On white

14.82
#40124F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#40124F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40124F
14.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40124F#FFFFFF#000000##FFFFFF
##40124F1.0014.821.4214.82
#FFFFFF14.821.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002551
Deuteranopia (green-blind)
#12294E
Tritanopia (blue-blind)
#3F1E2F
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #40124f;
/* rgb */ color: rgb(64, 18, 79);
/* oklch */ color: oklch(29.0% 0.112 316.5);
Tailwind
colors: {
  custom: {
    50: '#775581',
    500: '#40124f',
    950: '#000000',
  },
}
SCSS
$custom: #40124f;
$custom-light: #775581;
$custom-dark: #000000;
JSON
{
  "hex": "#40124f",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 79
  },
  "hsl": {
    "h": 285.246,
    "s": 62.887,
    "l": 19.02
  },
  "oklch": {
    "l": 0.28958,
    "c": 0.1115,
    "h": 316.5
  },
  "luminance": 0.02087
}

Semantic roles & 50–950 ramp

primary
#40124F
secondary
#498835
accent
#E6426A
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40124F

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

Preview Lab → · Contrast checker → · Palette generator →

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