#8A2BE2
blueviolet
#8A2BE2 is a violet colour. In RGB it is 138 red, 43 green and 226 blue, which converts to a hue of 271 degrees, 76% saturation and 53% lightness. It is one of the named CSS colours, written as blueviolet in stylesheets.
Color values
| HEX | #8A2BE2 |
|---|---|
| RGB | rgb(138, 43, 226) |
| HSL | hsl(271, 76%, 53%) |
| HSV | hsv(271, 81%, 89%) |
| CMYK | cmyk(39%, 81%, 0%, 11%) |
Contrast and accessibility
Against white the contrast ratio is 5.96:1, and against black it is 3.52:1. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.
| Background | Ratio | Normal text | Large text |
|---|---|---|---|
| White | 5.96:1 | AA | AAA |
| Black | 3.52:1 | Fail | AA |
Tints and shades
Lighter tints move #8A2BE2 toward white, and darker shades move it toward black.
Tints
Shades
Color harmonies
Complementary
Analogous
Triadic
Split complementary
Code
| CSS | color: #8A2BE2; |
|---|---|
| CSS rgb() | color: rgb(138 43 226); |
| Tailwind | bg-[#8a2be2] |
| SwiftUI | Color(red: 0.541, green: 0.169, blue: 0.886) |
| Android | Color.parseColor("#8A2BE2") |