#542FA5#542FA5

#542FA5 is a dark, vivid violet. Relative luminance 0.066; OKLCH L 42.5% C 0.178 H 291.3°. Best body text is #FFFFFF at 9.03:1 contrast (WCAG AA passes).

Color values

HEX#542FA5
RGBrgb(84, 47, 165)
HSLhsl(259, 56%, 42%)
HSVhsv(259, 72%, 65%)
CMYKcmyk(49.1%, 71.5%, 0%, 35.3%)
CIE-LABlab(30.96, 44.62, -57.67)
CIE-LCHlch(30.96, 72.92, 307.73°)
OKLaboklab(42.45% 0.0645 -0.1654)
OKLCHoklch(42.45% 0.178 291.3)
XYZxyz(11.4623, 6.6340, 36.2666)
Luminance0.0663 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#542FA5 #80A52F
analogous
#2F45A5 #542FA5 #8F2FA5
triadic
#542FA5 #A5542F #2FA554
tetradic
#542FA5 #A52F45 #80A52F #2FA58F
square
#542FA5 #A52F45 #80A52F #2FA58F
split-complementary
#542FA5 #A58F2F #45A52F
monochromatic
#241446 #3C2175 #542FA5 #7047CB #9576D8

Accessibility & contrast

On white

9.03
#542FA5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.33
#542FA5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #542FA5
9.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##542FA5#FFFFFF#000000##FFFFFF
##542FA51.009.032.339.03
#FFFFFF9.031.0021.001.00
#0000002.3321.001.0021.00
##FFFFFF9.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BA8
Deuteranopia (green-blind)
#0046A3
Tritanopia (blue-blind)
#3A4D67
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #542fa5;
/* rgb */ color: rgb(84, 47, 165);
/* oklch */ color: oklch(42.5% 0.178 291.3);
Tailwind
colors: {
  custom: {
    50: '#8c6bc1',
    500: '#542fa5',
    950: '#000000',
  },
}
SCSS
$custom: #542fa5;
$custom-light: #8c6bc1;
$custom-dark: #000000;
JSON
{
  "hex": "#542fa5",
  "rgb": {
    "r": 84,
    "g": 47,
    "b": 165
  },
  "hsl": {
    "h": 258.814,
    "s": 55.66,
    "l": 41.569
  },
  "oklch": {
    "l": 0.42451,
    "c": 0.17755,
    "h": 291.3
  },
  "luminance": 0.06634
}

Semantic roles & 50–950 ramp

primary
#542FA5
secondary
#A7C070
accent
#DF49B0
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #542FA5

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

Preview Lab → · Contrast checker → · Palette generator →

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