Blue Violet color (#8A2BE2)
Blue Violet is one of the 148 CSS named colors. Use the keyword blueviolet
anywhere CSS accepts a color, or its hex code #8A2BE2, which is rgb(138, 43, 226) in RGB.
It is a medium, vivid cool color with a hue angle of 271° on the HSL color wheel and a perceived lightness of 53% in OKLCH. On a blue violet background, white text gives the higher contrast at 5.95:1, which passes WCAG AA for normal text.
Blue Violet color codes
| CSS name | blueviolet |
|
|---|---|---|
| HEX | #8A2BE2 |
|
| HEX (8-digit) | #8A2BE2FF |
|
| RGB | rgb(138, 43, 226) |
|
| HSL | hsl(271, 76%, 53%) |
|
| HSV / HSB | hsv(271, 81%, 89%) |
|
| OKLCH | oklch(53.4% 0.2503 301.4) |
|
| CMYK | cmyk(38.9%, 81%, 0%, 11.4%) |
Contrast with white and black
WCAG 2 contrast ratios and APCA lightness contrast (Lc) for blue violet used as text and as a background.
Tints and shades of blue violet
Tints mix blue violet with white; shades mix it with black, in 10% steps. Click a swatch to copy it, or build custom scales in the tint & shade generator.
Tints
Shades
Colors that go with blue violet
Harmonies calculated on the HSL color wheel. Explore more in the color scheme generator.
Complementary
Analogous
Triadic
Split-Complementary
Blue Violet with color blindness
Approximately how blue violet appears with each type of color vision deficiency. Test full designs with the color blindness simulator.
Using blue violet in CSS
.element {
color: blueviolet;
background-color: #8a2be2;
border-color: rgb(138 43 226 / 50%);
outline-color: oklch(53.4% 0.2503 301.4);
}Similar named colors
See all shades of purple or browse every CSS color name.