#542198#542198

#542198 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.6% C 0.178 H 296.7°. Best body text is #FFFFFF at 10.25:1 contrast (WCAG AA passes).

Color values

HEX#542198
RGBrgb(84, 33, 152)
HSLhsl(266, 64%, 36%)
HSVhsv(266, 78%, 60%)
CMYKcmyk(44.7%, 78.3%, 0%, 40.4%)
CIE-LABlab(27.41, 47.89, -55.58)
CIE-LCHlch(27.41, 73.37, 310.75°)
OKLaboklab(39.59% 0.0802 -0.1592)
OKLCHoklch(39.59% 0.178 296.7)
XYZxyz(9.8660, 5.2393, 30.1912)
Luminance0.0524 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#542198 #659821
analogous
#212A98 #542198 #902198
triadic
#542198 #985421 #219854
tetradic
#542198 #98212A #659821 #219890
square
#542198 #98212A #659821 #219890
split-complementary
#542198 #989021 #2A9821
monochromatic
#1C0B33 #381666 #542198 #702CCA #9059DB

Accessibility & contrast

On white

10.25
#542198 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#542198 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #542198
10.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##542198#FFFFFF#000000##FFFFFF
##5421981.0010.252.0510.25
#FFFFFF10.251.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419B
Deuteranopia (green-blind)
#003F96
Tritanopia (blue-blind)
#42415C
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #542198;
/* rgb */ color: rgb(84, 33, 152);
/* oklch */ color: oklch(39.6% 0.178 296.7);
Tailwind
colors: {
  custom: {
    50: '#8b62b7',
    500: '#542198',
    950: '#000000',
  },
}
SCSS
$custom: #542198;
$custom-light: #8b62b7;
$custom-dark: #000000;
JSON
{
  "hex": "#542198",
  "rgb": {
    "r": 84,
    "g": 33,
    "b": 152
  },
  "hsl": {
    "h": 265.714,
    "s": 64.324,
    "l": 36.275
  },
  "oklch": {
    "l": 0.39591,
    "c": 0.17823,
    "h": 296.7
  },
  "luminance": 0.0524
}

Semantic roles & 50–950 ramp

primary
#542198
secondary
#92BF56
accent
#E740A0
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0511
muted
#7E7A80

Preview Lab

Preview with #542198

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

Preview Lab → · Contrast checker → · Palette generator →

#542198 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva