#540F5A#540F5A

#540F5A is a dark, vivid purple. Relative luminance 0.030; OKLCH L 32.7% C 0.135 H 324.4°. Best body text is #FFFFFF at 13.18:1 contrast (WCAG AA passes).

Color values

HEX#540F5A
RGBrgb(84, 15, 90)
HSLhsl(295, 71%, 21%)
HSVhsv(295, 83%, 35%)
CMYKcmyk(6.7%, 83.3%, 0%, 64.7%)
CIE-LABlab(19.90, 40.64, -28.17)
CIE-LCHlch(19.90, 49.44, 325.27°)
OKLaboklab(32.74% 0.1099 -0.0786)
OKLCHoklch(32.74% 0.135 324.4)
XYZxyz(5.6723, 2.9650, 9.9444)
Luminance0.0296 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#540F5A #155A0F
analogous
#2E0F5A #540F5A #5A0F3A
triadic
#540F5A #5A540F #0F5A54
tetradic
#540F5A #5A2E0F #155A0F #0F3A5A
square
#540F5A #5A2E0F #155A0F #0F3A5A
split-complementary
#540F5A #3A5A0F #0F5A2E
monochromatic
#18041A #230626 #540F5A #85188E #B620C3

Accessibility & contrast

On white

13.18
#540F5A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#540F5A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #540F5A
13.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##540F5A#FFFFFF#000000##FFFFFF
##540F5A1.0013.181.5913.18
#FFFFFF13.181.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B5C
Deuteranopia (green-blind)
#1F3358
Tritanopia (blue-blind)
#561D34
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #540f5a;
/* rgb */ color: rgb(84, 15, 90);
/* oklch */ color: oklch(32.7% 0.135 324.4);
Tailwind
colors: {
  custom: {
    50: '#875789',
    500: '#540f5a',
    950: '#000000',
  },
}
SCSS
$custom: #540f5a;
$custom-light: #875789;
$custom-dark: #000000;
JSON
{
  "hex": "#540f5a",
  "rgb": {
    "r": 84,
    "g": 15,
    "b": 90
  },
  "hsl": {
    "h": 295.2,
    "s": 71.429,
    "l": 20.588
  },
  "oklch": {
    "l": 0.3274,
    "c": 0.13514,
    "h": 324.4
  },
  "luminance": 0.02965
}

Semantic roles & 50–950 ramp

primary
#540F5A
secondary
#399431
accent
#EE3A48
background
#F8F5F8
surface
#F0E9F0
border
#CBC5CB
text
#0C030B
muted
#7D787C

Preview Lab

Preview with #540F5A

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

Preview Lab → · Contrast checker → · Palette generator →

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