#6B21A8 color
The swatch above shows #6B21A8 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.
#6B21A8 is a dark, vivid violet, closest to the CSS named color rebeccapurple (#663399).
It is also a Tailwind CSS default: purple-800. That means you can write bg-purple-800 or text-purple-800 directly, with no arbitrary-value brackets and no entry in your theme config.
Color values
| HEX | #6B21A8 |
| RGB | rgb(107, 33, 168) |
| HSL | hsl(273, 67%, 39%) |
| CMYK | cmyk(36%, 80%, 0%, 34%) |
| Decimal | 7020968 |
| CSS | color: #6B21A8; |
| Android | 0xFF6B21A8 |
| Swift | UIColor(red: 0.420, green: 0.129, blue: 0.659, alpha: 1) |
Accessibility and contrast
| White text on #6B21A8 | 8.72:1 — AA pass · AA large pass · AAA pass |
| Black text on #6B21A8 | 2.41:1 — AA fail · AA large fail · AAA fail |
| Recommended text color | white |
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 #6B21A8
Each swatch keeps the hue and saturation of #6B21A8 and varies only lightness — the quickest way to build a usable scale from a single brand color.
Colors that go with #6B21A8
Harmonies generated by rotating the hue on the color wheel while holding saturation and lightness constant.
Using #6B21A8 in code
/* CSS */
.element { color: #6B21A8; background-color: #6B21A8; }
.element { color: rgb(107 33 168); }
.element { color: hsl(273 67% 39%); }
/* Tailwind */
<div class="bg-purple-800 text-white">
/* SCSS variable */
$brand: #6B21A8;
Frequently asked questions
What color is #6B21A8?
#6B21A8 is a dark, vivid violet. Its hue sits at 273° on the color wheel, with 67% saturation and 39% lightness.
What is #6B21A8 in RGB?
#6B21A8 converts to rgb(107, 33, 168) — 107 red, 33 green and 168 blue.
What is #6B21A8 in CMYK?
Approximately cmyk(36%, 80%, 0%, 34%). 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 #6B21A8 be white or black?
White gives the better contrast ratio (8.72:1 versus 2.41:1).
What is the complementary color of #6B21A8?
#5DA621 — the hue directly opposite #6B21A8 on the color wheel.