#40124E#40124E

#40124E is a dark, moderate purple. Relative luminance 0.021; OKLCH L 28.9% C 0.110 H 317.2°. Best body text is #FFFFFF at 14.85:1 contrast (WCAG AA passes).

Color values

HEX#40124E
RGBrgb(64, 18, 78)
HSLhsl(286, 63%, 19%)
HSVhsv(286, 77%, 31%)
CMYKcmyk(17.9%, 76.9%, 0%, 69.4%)
CIE-LABlab(15.86, 32.19, -26.72)
CIE-LCHlch(15.86, 41.84, 320.31°)
OKLaboklab(28.88% 0.081 -0.0751)
OKLCHoklch(28.88% 0.11 317.2)
XYZxyz(3.7056, 2.0728, 7.4111)
Luminance0.0207 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40124E #204E12
analogous
#22124E #40124E #4E123E
triadic
#40124E #4E4012 #124E40
tetradic
#40124E #4E2212 #204E12 #123E4E
square
#40124E #4E2212 #204E12 #123E4E
split-complementary
#40124E #3E4E12 #124E22
monochromatic
#140619 #17071C #40124E #691D80 #9229B1

Accessibility & contrast

On white

14.85
#40124E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40124E
14.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40124E#FFFFFF#000000##FFFFFF
##40124E1.0014.851.4114.85
#FFFFFF14.851.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002550
Deuteranopia (green-blind)
#13294D
Tritanopia (blue-blind)
#3F1E2E
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #40124e;
/* rgb */ color: rgb(64, 18, 78);
/* oklch */ color: oklch(28.9% 0.110 317.2);
Tailwind
colors: {
  custom: {
    50: '#775580',
    500: '#40124e',
    950: '#000000',
  },
}
SCSS
$custom: #40124e;
$custom-light: #775580;
$custom-dark: #000000;
JSON
{
  "hex": "#40124e",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 78
  },
  "hsl": {
    "h": 286,
    "s": 62.5,
    "l": 18.824
  },
  "oklch": {
    "l": 0.28882,
    "c": 0.11045,
    "h": 317.2
  },
  "luminance": 0.02073
}

Semantic roles & 50–950 ramp

primary
#40124E
secondary
#488735
accent
#E64268
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40124E

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

Preview Lab → · Contrast checker → · Palette generator →

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