About purple
The standard CSS purple: red and blue in equal amounts at half strength. Its hex code is #800080, which is rgb(128, 0, 128): 128 red, 0 green and 128 blue on a scale of 0 to 255.
Purple sits between warm and cool, so it can lean either way depending on what it's paired with.
Purple tints and shades
Lighter tints (mixed with white) and darker shades (mixed with black) of purple. Click any of them to copy its hex code.
Colors that go with purple
Complementary
The opposite color on the color wheel, for strong contrast.
Analogous
Neighbors on the color wheel, for a calm, matching look.
Triadic
Three colors evenly spaced around the wheel, for a balanced, lively palette.
Split complementary
The two colors either side of the complement: contrast without clashing.
Text on purple
White text
Black text
For readable text, WCAG asks for a contrast ratio of at least 4.5:1 (3:1 for large text). White text is the better choice on purple. Test other combinations with the contrast checker.
Using purple in CSS
.element {
color: #800080;
background-color: rgb(128 0 128);
border-color: hsl(300 100% 25%);
}
Frequently asked questions
What is the hex code for purple?
Purple is #800080. In RGB it's rgb(128, 0, 128), and in HSL it's hsl(300, 100%, 25%).
What colors go with purple?
Its complementary color is #008000, which gives strong contrast. For a softer look, use analogous colors #400080 and #800040. Purple also pairs well with white.
Is purple warm or cool?
Purple sits between warm and cool, so it can lean either way depending on what it's paired with.
Should I use white or black text on purple?
Use white text. Its contrast ratio on purple is 9.41:1, versus 2.22:1 for black.
Similar colors
- Magenta#FF00FFrgb(255, 0, 255)
- Indigo#4B0082rgb(75, 0, 130)
- Violet#7F00FFrgb(127, 0, 255)
- Plum#8E4585rgb(142, 69, 133)
- Hot pink#FF69B4rgb(255, 105, 180)
- Mauve#E0B0FFrgb(224, 176, 255)
See all popular colors · All HTML color names · Open purple in the color picker