Purple color codes
| CSS name | purple |
|---|---|
| HEX | #800080 |
| RGB | rgb(128, 0, 128) |
| HSL | hsl(300, 100%, 25%) |
| CMYK | cmyk(0%, 100%, 0%, 50%) |
| Decimal | 8388736 |
Shades of Purple (darker)
#730073 · #660066 · #5A005A · #4D004D · #400040 · #330033 · #260026 · #1A001A · #0D000D
Tints of Purple (lighter)
#8D1A8D · #993399 · #A64DA6 · #B366B3 · #C080C0 · #CC99CC · #D9B3D9 · #E6CCE6 · #F2E6F2
Color harmonies
| Complementary | #008000 |
|---|---|
| Triadic | #808000, #008080 |
| Analogous | #400080, #800040 |
Accessibility (WCAG contrast)
| White text on Purple | 9.42:1 · AAA |
|---|---|
| Black text on Purple | 2.23:1 · Fail |
Use Purple in code
.element {
color: purple; /* or #800080 */
background-color: rgb(128 0 128 / 0.5);
}Frequently asked questions
What is the hex code for Purple?
Purple is #800080 in HEX, rgb(128, 0, 128) in RGB and hsl(300, 100%, 25%) in HSL.
Can I use "purple" directly in CSS?
Yes. "purple" is one of the 148 standard CSS named colors, so color: purple; works in every browser.
Is Purple readable on white?
The contrast ratio of Purple on white is 9.42:1 (WCAG AAA). On black it is 2.23:1 (Fail).
What is the complementary color of Purple?
The complementary color (opposite on the color wheel) is #008000.
Similar colors
Dark Magenta#8B008BIndigo#4B0082Rebecca Purple#663399Medium Violet Red#C71585Dark Slate Blue#483D8BDark Violet#9400D3Dark Orchid#9932CCBrown#A52A2A
Convert any color with the Color Converter, generate palettes with the Random Color Generator, or browse all 148 CSS color names.