purple — #800080
#800080
rgb(128, 0, 128) · hsl(300, 100%, 25%) · CSS keyword purple
Can you put text on it?
| Contrast | Body text | Large text | |
|---|---|---|---|
| purple on white | 9.42:1 | AA | AA |
| purple on black | 2.23:1 | — | — |
As a background, purple takes white text: 9.42:1 against 2.23: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: purple;
color: #800080;
color: rgb(128 0 128);
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 purple
- darkmagenta — #8B008B
- indigo — #4B0082
- darkviolet — #9400D3
- mediumvioletred — #C71585
- maroon — #800000
- rebeccapurple — #663399
Frequently asked questions
What is the hex code for purple?
The hex code for purple is #800080 — RGB 128, 0, 128.
Can I use purple for text?
Yes. purple reaches 9.42:1 against white, past the 4.5:1 that WCAG AA asks for body text.
Should text on purple be black or white?
White — 9.42:1 against 2.23:1 the other way.
Other named colours
- rebeccapurple — #663399
- red — #FF0000
- rosybrown — #BC8F8F
- royalblue — #4169E1
- saddlebrown — #8B4513
- salmon — #FA8072
- sandybrown — #F4A460
- seagreen — #2E8B57
- seashell — #FFF5EE
- sienna — #A0522D
- silver — #C0C0C0
- skyblue — #87CEEB
#800080 in full — tints, shades and harmonies · All named colours · Colour reference