violet — #EE82EE
#EE82EE
rgb(238, 130, 238) · hsl(300, 76%, 72%) · CSS keyword violet
Can you put text on it?
| Contrast | Body text | Large text | |
|---|---|---|---|
| violet on white | 2.32:1 | — | — |
| violet on black | 9.06:1 | AA | AA |
As a background, violet takes black text: 9.06:1 against 2.32:1 the other way. A colour picker will give you the hex and stop there, which is why so many palettes look right and fail an accessibility audit.
Using it
color: violet;
color: #ee82ee;
color: rgb(238 130 238);
All three are the same colour. The keyword is one of the 141 CSS named colours — a list settled in CSS 2.1 and added to exactly once since, when rebeccapurple was standardised in 2014.
Colours close to violet
- orchid — #DA70D6
- plum — #DDA0DD
- hotpink — #FF69B4
- palevioletred — #DB7093
- lightcoral — #F08080
- darksalmon — #E9967A
Frequently asked questions
What is the hex code for violet?
The hex code for violet is #EE82EE — RGB 238, 130, 238.
Can I use violet for text?
Not on a white background. violet reaches only 2.32:1, and WCAG AA asks for 4.5:1. It works as a background or a border, not as ink.
Should text on violet be black or white?
Black — 9.06:1 against 2.32:1 the other way.
Other named colours
- wheat — #F5DEB3
- white — #FFFFFF
- whitesmoke — #F5F5F5
- yellow — #FFFF00
- yellowgreen — #9ACD32
- aliceblue — #F0F8FF
- antiquewhite — #FAEBD7
- aqua — #00FFFF
- aquamarine — #7FFFD4
- azure — #F0FFFF
- beige — #F5F5DC
- bisque — #FFE4C4
#EE82EE in full — tints, shades and harmonies · All named colours · Colour reference