Toolman

#5B21B6 color

#5B21B6#5B21B6

The swatch above shows #5B21B6 with its hex code written on it in white and in black, so you can see which of the two is legible before reading the measured ratios below.

#5B21B6 is a medium, vivid violet, closest to the CSS named color rebeccapurple (#663399).

It is also a Tailwind CSS default: violet-800. That means you can write bg-violet-800 or text-violet-800 directly, with no arbitrary-value brackets and no entry in your theme config.

Color values

HEX#5B21B6
RGBrgb(91, 33, 182)
HSLhsl(263, 69%, 42%)
CMYKcmyk(50%, 82%, 0%, 29%)
Decimal5972406
CSScolor: #5B21B6;
Android0xFF5B21B6
SwiftUIColor(red: 0.357, green: 0.129, blue: 0.714, alpha: 1)

Accessibility and contrast

White text on #5B21B68.98:1 — AA pass · AA large pass · AAA pass
Black text on #5B21B62.34:1 — AA fail · AA large fail · AAA fail
Recommended text colorwhite

WCAG 2.1 asks for at least 4.5:1 for body text and 3:1 for large text (18 pt, or 14 pt bold).

Tints and shades of #5B21B6

Each swatch keeps the hue and saturation of #5B21B6 and varies only lightness — the quickest way to build a usable scale from a single brand color.

95%
85%
75%
65%
55%
45%
35%
25%
15%

Colors that go with #5B21B6

Harmonies generated by rotating the hue on the color wheel while holding saturation and lightness constant.

Complementary
Triadic +120°
Triadic +240°
Analogous −30°
Analogous +30°
Split −150°
Split +150°

Using #5B21B6 in code

/* CSS */
.element { color: #5B21B6; background-color: #5B21B6; }
.element { color: rgb(91 33 182); }
.element { color: hsl(263 69% 42%); }

/* Tailwind */
<div class="bg-violet-800 text-white">

/* SCSS variable */
$brand: #5B21B6;

Frequently asked questions

What color is #5B21B6?

#5B21B6 is a medium, vivid violet. Its hue sits at 263° on the color wheel, with 69% saturation and 42% lightness.

What is #5B21B6 in RGB?

#5B21B6 converts to rgb(91, 33, 182) — 91 red, 33 green and 182 blue.

What is #5B21B6 in CMYK?

Approximately cmyk(50%, 82%, 0%, 29%). Print output depends on the ICC profile of the press and paper, so treat this as a starting point rather than an exact match.

Should text on #5B21B6 be white or black?

White gives the better contrast ratio (8.98:1 versus 2.34:1).

What is the complementary color of #5B21B6?

#7CB521 — the hue directly opposite #5B21B6 on the color wheel.

Convert any color → · Browse all colors