#542DAB#542DAB

#542DAB is a dark, vivid violet. Relative luminance 0.067; OKLCH L 42.7% C 0.187 H 290.3°. Best body text is #FFFFFF at 8.97:1 contrast (WCAG AA passes).

Color values

HEX#542DAB
RGBrgb(84, 45, 171)
HSLhsl(259, 58%, 42%)
HSVhsv(259, 74%, 67%)
CMYKcmyk(50.9%, 73.7%, 0%, 32.9%)
CIE-LABlab(31.12, 47.34, -61.02)
CIE-LCHlch(31.12, 77.23, 307.81°)
OKLaboklab(42.73% 0.065 -0.1752)
OKLCHoklch(42.73% 0.187 290.3)
XYZxyz(11.9431, 6.7014, 39.1844)
Luminance0.0670 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#542DAB #84AB2D
analogous
#2D45AB #542DAB #932DAB
triadic
#542DAB #AB542D #2DAB54
tetradic
#542DAB #AB2D45 #84AB2D #2DAB93
square
#542DAB #AB2D45 #84AB2D #2DAB93
split-complementary
#542DAB #AB932D #45AB2D
monochromatic
#24144A #3C207B #542DAB #7147CE #9677DB

Accessibility & contrast

On white

8.97
#542DAB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.34
#542DAB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #542DAB
8.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##542DAB#FFFFFF#000000##FFFFFF
##542DAB1.008.972.348.97
#FFFFFF8.971.0021.001.00
#0000002.3421.001.0021.00
##FFFFFF8.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BAF
Deuteranopia (green-blind)
#0046A9
Tritanopia (blue-blind)
#364F69
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #542dab;
/* rgb */ color: rgb(84, 45, 171);
/* oklch */ color: oklch(42.7% 0.187 290.3);
Tailwind
colors: {
  custom: {
    50: '#8d6ac5',
    500: '#542dab',
    950: '#000000',
  },
}
SCSS
$custom: #542dab;
$custom-light: #8d6ac5;
$custom-dark: #000000;
JSON
{
  "hex": "#542dab",
  "rgb": {
    "r": 84,
    "g": 45,
    "b": 171
  },
  "hsl": {
    "h": 258.571,
    "s": 58.333,
    "l": 42.353
  },
  "oklch": {
    "l": 0.42725,
    "c": 0.18689,
    "h": 290.3
  },
  "luminance": 0.06702
}

Semantic roles & 50–950 ramp

primary
#542DAB
secondary
#AAC371
accent
#E246B1
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #542DAB

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

Preview Lab → · Contrast checker → · Palette generator →

#542DAB Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva