Home / Colors / Purple hex code

Purple hex code

The standard CSS purple: red and blue in equal amounts at half strength.

#800080 Purple
HEX#800080
RGBrgb(128, 0, 128)
HSLhsl(300, 100%, 25%)
HSVhsv(300, 100%, 50%)
CMYKcmyk(0%, 100%, 0%, 50%)
Advertisement

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

9.41:1 · Passes AAA for all text

Black text

2.22:1 · Fails for 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%);
}
Advertisement

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

See all popular colors · All HTML color names · Open purple in the color picker

Advertisement