Purple Color
HEX #800080 · rgb(128, 0, 128) · hsl(300, 100%, 25%)
Purple color codes
Purple is one of the named colors every browser understands. In CSS you can write it as purple or #800080.
| Format | Value | |
|---|---|---|
| HEX | #800080 | |
| RGB | rgb(128, 0, 128) | |
| HSL | hsl(300, 100%, 25%) | |
| CMYK | 0%, 100%, 0%, 50% | |
| CSS name | purple |
.example {
color: purple;
background-color: #800080;
border-color: rgb(128, 0, 128);
}
Colors that go with purple
These harmonies keep the same saturation and lightness and rotate the hue around the color wheel.
Tints and shades of purple
Tints mix the color with white; shades mix it with black.
Purple
Contrast and readability
2.23:1
fails
9.42:1
passes AA and AAA
Use white text on purple. Ratios follow the WCAG 2 formula; AA needs 4.5:1 for normal text and 3:1 for large text.
Frequently asked questions
What is the hex code for purple?
The hex code for purple is #800080.
What is the RGB value of purple?
Purple is rgb(128, 0, 128): 128 red, 0 green and 128 blue on a 0 to 255 scale.
What color goes with purple?
Its complementary color is #008000, which is closest to the named color green. Analogous and triadic matches are listed on this page.
Should text on purple be black or white?
Use white text. The contrast ratio is 2.23:1 with black and 9.42:1 with white. WCAG AA asks for at least 4.5:1 for normal text.
Similar named colors
Pick any other color with the color picker, or browse all named colors.