#540F68#540F68

#540F68 is a dark, vivid purple. Relative luminance 0.032; OKLCH L 33.8% C 0.148 H 316.9°. Best body text is #FFFFFF at 12.76:1 contrast (WCAG AA passes).

Color values

HEX#540F68
RGBrgb(84, 15, 104)
HSLhsl(287, 75%, 23%)
HSVhsv(287, 86%, 41%)
CMYKcmyk(19.2%, 85.6%, 0%, 59.2%)
CIE-LABlab(20.93, 43.45, -35.77)
CIE-LCHlch(20.93, 56.28, 320.53°)
OKLaboklab(33.79% 0.1079 -0.1009)
OKLCHoklch(33.79% 0.148 316.9)
XYZxyz(6.3253, 3.2262, 13.3836)
Luminance0.0323 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#540F68 #23680F
analogous
#270F68 #540F68 #680F4F
triadic
#540F68 #68540F #0F6854
tetradic
#540F68 #68270F #23680F #0F4F68
square
#540F68 #68270F #23680F #0F4F68
split-complementary
#540F68 #4F680F #0F6827
monochromatic
#16041B #290733 #540F68 #7F179D #AA1ED3

Accessibility & contrast

On white

12.76
#540F68 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#540F68 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #540F68
12.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##540F68#FFFFFF#000000##FFFFFF
##540F681.0012.761.6512.76
#FFFFFF12.761.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E6A
Deuteranopia (green-blind)
#103466
Tritanopia (blue-blind)
#53243C
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #540f68;
/* rgb */ color: rgb(84, 15, 104);
/* oklch */ color: oklch(33.8% 0.148 316.9);
Tailwind
colors: {
  custom: {
    50: '#885894',
    500: '#540f68',
    950: '#000000',
  },
}
SCSS
$custom: #540f68;
$custom-light: #885894;
$custom-dark: #000000;
JSON
{
  "hex": "#540f68",
  "rgb": {
    "r": 84,
    "g": 15,
    "b": 104
  },
  "hsl": {
    "h": 286.517,
    "s": 74.79,
    "l": 23.333
  },
  "oklch": {
    "l": 0.33789,
    "c": 0.14772,
    "h": 316.9
  },
  "luminance": 0.03226
}

Semantic roles & 50–950 ramp

primary
#540F68
secondary
#4BA132
accent
#F13660
background
#F8F5F9
surface
#F0E9F1
border
#CBC5CB
text
#0C040D
muted
#7D797E

Preview Lab

Preview with #540F68

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

Preview Lab → · Contrast checker → · Palette generator →

#540F68 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva