#540F6A#540F6A

#540F6A is a dark, vivid purple. Relative luminance 0.033; OKLCH L 33.9% C 0.150 H 316.0°. Best body text is #FFFFFF at 12.70:1 contrast (WCAG AA passes).

Color values

HEX#540F6A
RGBrgb(84, 15, 106)
HSLhsl(285, 75%, 24%)
HSVhsv(285, 86%, 42%)
CMYKcmyk(20.8%, 85.8%, 0%, 58.4%)
CIE-LABlab(21.08, 43.87, -36.83)
CIE-LCHlch(21.08, 57.28, 319.99°)
OKLaboklab(33.95% 0.1075 -0.104)
OKLCHoklch(33.95% 0.15 316)
XYZxyz(6.4281, 3.2673, 13.9249)
Luminance0.0327 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#540F6A #256A0F
analogous
#260F6A #540F6A #6A0F52
triadic
#540F6A #6A540F #0F6A54
tetradic
#540F6A #6A260F #256A0F #0F526A
square
#540F6A #6A260F #256A0F #0F526A
split-complementary
#540F6A #526A0F #0F6A26
monochromatic
#15041B #2A0734 #540F6A #7E17A0 #A91ED5

Accessibility & contrast

On white

12.70
#540F6A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #540F6A
12.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##540F6A#FFFFFF#000000##FFFFFF
##540F6A1.0012.701.6512.70
#FFFFFF12.701.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F6C
Deuteranopia (green-blind)
#0C3468
Tritanopia (blue-blind)
#52253E
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #540f6a;
/* rgb */ color: rgb(84, 15, 106);
/* oklch */ color: oklch(33.9% 0.150 316.0);
Tailwind
colors: {
  custom: {
    50: '#885895',
    500: '#540f6a',
    950: '#000000',
  },
}
SCSS
$custom: #540f6a;
$custom-light: #885895;
$custom-dark: #000000;
JSON
{
  "hex": "#540f6a",
  "rgb": {
    "r": 84,
    "g": 15,
    "b": 106
  },
  "hsl": {
    "h": 285.495,
    "s": 75.207,
    "l": 23.725
  },
  "oklch": {
    "l": 0.33948,
    "c": 0.14955,
    "h": 316
  },
  "luminance": 0.03267
}

Semantic roles & 50–950 ramp

primary
#540F6A
secondary
#4DA232
accent
#F23663
background
#F8F5F9
surface
#F0E9F2
border
#CBC5CC
text
#0C040D
muted
#7D797E

Preview Lab

Preview with #540F6A

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

Preview Lab → · Contrast checker → · Palette generator →

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