#540E7F#540E7F

#540E7F is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.7% C 0.170 H 307.0°. Best body text is #FFFFFF at 12.03:1 contrast (WCAG AA passes).

Color values

HEX#540E7F
RGBrgb(84, 14, 127)
HSLhsl(277, 80%, 28%)
HSVhsv(277, 89%, 50%)
CMYKcmyk(33.9%, 89%, 0%, 50.2%)
CIE-LABlab(22.76, 48.73, -47.60)
CIE-LCHlch(22.76, 68.12, 315.68°)
OKLaboklab(35.67% 0.1023 -0.1356)
OKLCHoklch(35.67% 0.17 307)
XYZxyz(7.6431, 3.7313, 20.3921)
Luminance0.0373 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#540E7F #397F0E
analogous
#1B0E7F #540E7F #7F0E72
triadic
#540E7F #7F540E #0E7F54
tetradic
#540E7F #7F1B0E #397F0E #0E727F
square
#540E7F #7F1B0E #397F0E #0E727F
split-complementary
#540E7F #727F0E #0E7F1B
monochromatic
#12031C #300848 #540E7F #7814B6 #9B21E7

Accessibility & contrast

On white

12.03
#540E7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #540E7F
12.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##540E7F#FFFFFF#000000##FFFFFF
##540E7F1.0012.031.7512.03
#FFFFFF12.031.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.031.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #540e7f;
/* rgb */ color: rgb(84, 14, 127);
/* oklch */ color: oklch(35.7% 0.170 307.0);
Tailwind
colors: {
  custom: {
    50: '#8959a5',
    500: '#540e7f',
    950: '#000000',
  },
}
SCSS
$custom: #540e7f;
$custom-light: #8959a5;
$custom-dark: #000000;
JSON
{
  "hex": "#540e7f",
  "rgb": {
    "r": 84,
    "g": 14,
    "b": 127
  },
  "hsl": {
    "h": 277.168,
    "s": 80.142,
    "l": 27.647
  },
  "oklch": {
    "l": 0.35669,
    "c": 0.16983,
    "h": 307
  },
  "luminance": 0.03731
}

Semantic roles & 50–950 ramp

primary
#540E7F
secondary
#65B633
accent
#F7317C
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0C040F
muted
#7D797F

Preview Lab

Preview with #540E7F

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

Preview Lab → · Contrast checker → · Palette generator →

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