Blue Violet Hex Code #8A2BE2
Blue Violet is a medium, vivid purple with the hex code #8A2BE2. In RGB it is 138, 43, 226, and in HSL it is 271°, 76%, 53%. It is one of the 148 named colors in CSS, so you can write “blueviolet” instead of the hex code.
- HEX
- #8A2BE2
- RGB
- rgb(138, 43, 226)
- HSL
- hsl(271, 76%, 53%)
- HSV
- hsv(271°, 81%, 89%)
- CMYK
- cmyk(39%, 81%, 0%, 11%)
- CSS name
- blueviolet
CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.
About Blue Violet
On a white background Blue Violet has a contrast ratio of 5.96:1 (AA), and on black 3.52:1 (AA Large). White text is the better choice on top of it.
It sits between the warm and cool halves of the color wheel, so it pairs comfortably with either.
Purple combines the calm of blue with the energy of red. It reads as creative and premium, and is often used by design, media and beauty brands.
Shades and tints of Blue Violet
Tints mix Blue Violet with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.
Color harmonies for Blue Violet
These schemes are calculated from Blue Violet on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.
On the artist’s RYB wheel, the complement of Blue Violet is #E2DB2B, close to the named color Gold.
Blue Violet contrast and accessibility
WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Blue Violet scores against white and black.
| Against | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| White (#ffffff) | 5.96:1 | ✓ Pass | ✓ Pass | ✕ Fail | ✓ Pass |
| Black (#000000) | 3.52:1 | ✕ Fail | ✓ Pass | ✕ Fail | ✕ Fail |
Blue Violet and color blindness
These are approximate previews of how Blue Violet can look with the main types of color vision deficiency.
Blue Violet changes noticeably.
Blue Violet changes noticeably.
Blue Violet changes noticeably.
Blue Violet changes noticeably.
Gradients with Blue Violet
Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.
Blue Violet to a lighter tint
background: linear-gradient(135deg, #8a2be2 0%, #d0aaf3 100%); Blue Violet to its analogous neighbour
background: linear-gradient(135deg, #8a2be2 0%, #e22bde 100%); Blue Violet to its complement
background: linear-gradient(135deg, #8a2be2 0%, #83e22b 100%); Colors similar to Blue Violet
How each close match differs from Blue Violet.
- Dark Violet #9400D3 More saturated.
- Dark Orchid #9932CC More muted.
- Medium Blue #0000CD Darker, more saturated, leans more blue.
- Medium Orchid #BA55D3 Slightly lighter, more muted.
- Medium Slate Blue #7B68EE Slightly lighter, more muted, leans more blue.
- Dark Blue #00008B Darker, more muted, leans more blue.
Use Blue Violet in code
.element {
color: #8a2be2;
background-color: #8a2be2;
border-color: blueviolet; /* blueviolet is a valid CSS color name */
} :root {
--color-blue-violet: #8a2be2;
} <!-- Tailwind arbitrary values -->
<div class="bg-[#8a2be2] text-[#8a2be2] border-[#8a2be2]"></div>
/* Tailwind v4 theme color */
@theme {
--color-blue-violet: #8a2be2;
} Blue Violet questions
What is the hex code for Blue Violet?
The hex code for Blue Violet is #8A2BE2. In RGB that is rgb(138, 43, 226), and in HSL it is hsl(271, 76%, 53%).
What is the complementary color of Blue Violet?
On the RGB (screen) color wheel, the complement of Blue Violet is #83E22B, which is close to Green Yellow. On the artist’s RYB wheel it is #E2DB2B, close to Gold.
Should I use white or black text on Blue Violet?
White text. It has a contrast ratio of 5.96:1 against Blue Violet, which is WCAG AA. The other option scores 3.52:1.
Is Blue Violet accessible as a text color on white?
Yes. Blue Violet on white scores 5.96:1, which passes WCAG AA for normal text (4.5:1).
What are darker and lighter shades of Blue Violet?
Mixing Blue Violet with black gives #6E22B5, #531A88, #37115A, #1C092D (20% to 80% black). Mixing it with white gives #A155E8, #B980EE, #D0AAF3, #E8D5F9 (20% to 80% white).