#40154C#40154C

#40154C is a dark, moderate purple. Relative luminance 0.021; OKLCH L 29.1% C 0.104 H 318.1°. Best body text is #FFFFFF at 14.69:1 contrast (WCAG AA passes).

Color values

HEX#40154C
RGBrgb(64, 21, 76)
HSLhsl(287, 57%, 19%)
HSVhsv(287, 72%, 30%)
CMYKcmyk(15.8%, 72.4%, 0%, 70.2%)
CIE-LABlab(16.25, 30.26, -24.74)
CIE-LCHlch(16.25, 39.08, 320.73°)
OKLaboklab(29.11% 0.0773 -0.0693)
OKLCHoklch(29.11% 0.104 318.1)
XYZxyz(3.6868, 2.1483, 7.0565)
Luminance0.0215 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40154C #214C15
analogous
#25154C #40154C #4C153D
triadic
#40154C #4C4015 #154C40
tetradic
#40154C #4C2515 #214C15 #153D4C
square
#40154C #4C2515 #214C15 #153D4C
split-complementary
#40154C #3D4C15 #154C25
monochromatic
#140718 #18081C #40154C #68227C #912FAC

Accessibility & contrast

On white

14.69
#40154C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#40154C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40154C
14.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40154C#FFFFFF#000000##FFFFFF
##40154C1.0014.691.4314.69
#FFFFFF14.691.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#03254E
Deuteranopia (green-blind)
#172A4B
Tritanopia (blue-blind)
#401F2E
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #40154c;
/* rgb */ color: rgb(64, 21, 76);
/* oklch */ color: oklch(29.1% 0.104 318.1);
Tailwind
colors: {
  custom: {
    50: '#77567e',
    500: '#40154c',
    950: '#000000',
  },
}
SCSS
$custom: #40154c;
$custom-light: #77567e;
$custom-dark: #000000;
JSON
{
  "hex": "#40154c",
  "rgb": {
    "r": 64,
    "g": 21,
    "b": 76
  },
  "hsl": {
    "h": 286.909,
    "s": 56.701,
    "l": 19.02
  },
  "oklch": {
    "l": 0.2911,
    "c": 0.1038,
    "h": 318.1
  },
  "luminance": 0.02148
}

Semantic roles & 50–950 ramp

primary
#40154C
secondary
#498439
accent
#E04869
background
#F7F5F7
surface
#EDE9EE
border
#C8C5C9
text
#09030A
muted
#7B787C

Preview Lab

Preview with #40154C

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

Preview Lab → · Contrast checker → · Palette generator →

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