#8040BF color
#8040BF is a medium, moderately saturated violet, closest to the CSS named color darkorchid (#9932CC).
Color values
| HEX | #8040BF |
| RGB | rgb(128, 64, 191) |
| HSL | hsl(270, 50%, 50%) |
| CMYK | cmyk(33%, 66%, 0%, 25%) |
| Decimal | 8405183 |
| CSS | color: #8040BF; |
| Android | 0xFF8040BF |
| Swift | UIColor(red: 0.502, green: 0.251, blue: 0.749, alpha: 1) |
Accessibility and contrast
| White text on #8040BF | 6.17:1 — AA pass · AA large pass · AAA fail |
| Black text on #8040BF | 3.40:1 — AA fail · AA large pass · 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 #8040BF
Each swatch keeps the hue and saturation of #8040BF and varies only lightness — the quickest way to build a usable scale from a single brand color.
Colors that go with #8040BF
Harmonies generated by rotating the hue on the color wheel while holding saturation and lightness constant.
Using #8040BF in code
/* CSS */
.element { color: #8040BF; background-color: #8040BF; }
.element { color: rgb(128 64 191); }
.element { color: hsl(270 50% 50%); }
/* Tailwind arbitrary value */
<div class="bg-[#8040BF] text-white">
/* SCSS variable */
$brand: #8040BF;
Frequently asked questions
What color is #8040BF?
#8040BF is a medium, moderately saturated violet. Its hue sits at 270° on the color wheel, with 50% saturation and 50% lightness.
What is #8040BF in RGB?
#8040BF converts to rgb(128, 64, 191) — 128 red, 64 green and 191 blue.
What is #8040BF in CMYK?
Approximately cmyk(33%, 66%, 0%, 25%). 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 #8040BF be white or black?
White gives the better contrast ratio (6.17:1 versus 3.40:1).
What is the complementary color of #8040BF?
#80BF40 — the hue directly opposite #8040BF on the color wheel.