#540F7F#540F7F

#540F7F is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.7% C 0.169 H 306.9°. Best body text is #FFFFFF at 11.99:1 contrast (WCAG AA passes).

Color values

HEX#540F7F
RGBrgb(84, 15, 127)
HSLhsl(277, 79%, 28%)
HSVhsv(277, 88%, 50%)
CMYKcmyk(33.9%, 88.2%, 0%, 50.2%)
CIE-LABlab(22.86, 48.45, -47.44)
CIE-LCHlch(22.86, 67.81, 315.61°)
OKLaboklab(35.73% 0.1017 -0.1351)
OKLCHoklch(35.73% 0.169 306.9)
XYZxyz(7.6569, 3.7589, 20.3967)
Luminance0.0376 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#540F7F #3A7F0F
analogous
#1C0F7F #540F7F #7F0F72
triadic
#540F7F #7F540F #0F7F54
tetradic
#540F7F #7F1C0F #3A7F0F #0F727F
square
#540F7F #7F1C0F #3A7F0F #0F727F
split-complementary
#540F7F #727F0F #0F7F1C
monochromatic
#12031B #300948 #540F7F #7815B6 #9B23E5

Accessibility & contrast

On white

11.99
#540F7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#540F7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #540F7F
11.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##540F7F#FFFFFF#000000##FFFFFF
##540F7F1.0011.991.7511.99
#FFFFFF11.991.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF11.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003482
Deuteranopia (green-blind)
#00377D
Tritanopia (blue-blind)
#4C2F4A
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #540f7f;
/* rgb */ color: rgb(84, 15, 127);
/* oklch */ color: oklch(35.7% 0.169 306.9);
Tailwind
colors: {
  custom: {
    50: '#8959a5',
    500: '#540f7f',
    950: '#000000',
  },
}
SCSS
$custom: #540f7f;
$custom-light: #8959a5;
$custom-dark: #000000;
JSON
{
  "hex": "#540f7f",
  "rgb": {
    "r": 84,
    "g": 15,
    "b": 127
  },
  "hsl": {
    "h": 276.964,
    "s": 78.873,
    "l": 27.843
  },
  "oklch": {
    "l": 0.35734,
    "c": 0.1691,
    "h": 306.9
  },
  "luminance": 0.03759
}

Semantic roles & 50–950 ramp

primary
#540F7F
secondary
#66B534
accent
#F5327D
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C040F
muted
#7D797F

Preview Lab

Preview with #540F7F

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

Preview Lab → · Contrast checker → · Palette generator →

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