#542AB5#542AB5

#542AB5 is a dark, highly saturated violet. Relative luminance 0.069; OKLCH L 43.3% C 0.201 H 288.8°. Best body text is #FFFFFF at 8.84:1 contrast (WCAG AA passes).

Color values

HEX#542AB5
RGBrgb(84, 42, 181)
HSLhsl(258, 62%, 44%)
HSVhsv(258, 77%, 71%)
CMYKcmyk(53.6%, 76.8%, 0%, 29%)
CIE-LABlab(31.52, 51.59, -66.33)
CIE-LCHlch(31.52, 84.03, 307.88°)
OKLaboklab(43.29% 0.0648 -0.1907)
OKLCHoklch(43.29% 0.201 288.8)
XYZxyz(12.8222, 6.8763, 44.3587)
Luminance0.0688 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#542AB5 #8BB52A
analogous
#2A46B5 #542AB5 #992AB5
triadic
#542AB5 #B5542A #2AB554
tetradic
#542AB5 #B52A46 #8BB52A #2AB599
square
#542AB5 #B52A46 #8BB52A #2AB599
split-complementary
#542AB5 #B5992A #46B52A
monochromatic
#261352 #3D1E83 #542AB5 #7248D4 #9879E0

Accessibility & contrast

On white

8.84
#542AB5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.38
#542AB5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #542AB5
8.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##542AB5#FFFFFF#000000##FFFFFF
##542AB51.008.842.388.84
#FFFFFF8.841.0021.001.00
#0000002.3821.001.0021.00
##FFFFFF8.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DB9
Deuteranopia (green-blind)
#0047B2
Tritanopia (blue-blind)
#2E516E
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #542ab5;
/* rgb */ color: rgb(84, 42, 181);
/* oklch */ color: oklch(43.3% 0.201 288.8);
Tailwind
colors: {
  custom: {
    50: '#8f69cc',
    500: '#542ab5',
    950: '#000000',
  },
}
SCSS
$custom: #542ab5;
$custom-light: #8f69cc;
$custom-dark: #000000;
JSON
{
  "hex": "#542ab5",
  "rgb": {
    "r": 84,
    "g": 42,
    "b": 181
  },
  "hsl": {
    "h": 258.129,
    "s": 62.332,
    "l": 43.725
  },
  "oklch": {
    "l": 0.43291,
    "c": 0.20146,
    "h": 288.8
  },
  "luminance": 0.06877
}

Semantic roles & 50–950 ramp

primary
#542AB5
secondary
#AEC873
accent
#E542B4
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0E0614
muted
#7E7A82

Preview Lab

Preview with #542AB5

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

Preview Lab → · Contrast checker → · Palette generator →

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