Skip to content

Purple

Purple is a dark, vivid color from the purple family. Hex code #800080.

Purple#800080

Color codes

  • CSS namepurple
  • HEX#800080
  • RGBrgb(128 0 128)
  • HSLhsl(300 100% 25%)
  • HSB / HSVhsb(300, 100%, 50%)
  • OKLCHoklch(42.1% 0.193 328.4)
  • CMYKcmyk(0%, 100%, 0%, 50%)

White text

9.41:1 · passes WCAG AAA

Black text

2.22:1 · fails WCAG

Shades

50#FFEBFD
100#FEBAFA
200#F986F5
300#DA69D7
400#BC4DBA
500#9F2F9E
600#820482
700#5E005E
800#3C003C

Complementary

#800080
#0C5D26

Analogous

#800080
#5E21A6
#8A144C

Triadic

#800080
#604A06
#0F5761

About this color

Purple in CSS and design

Purple is a dark, vivid color from the purple family. Purple is one of the 16 basic color keywords, which go back to HTML 4, long before CSS had 148 named colors.

Use it in CSS by name or by any of its codes; these all give the same color:

color: purple;
color: #800080;
color: rgb(128 0 128);
color: hsl(300 100% 25%);

For text on purple, white reads best. Check other combinations with the contrast checker, or browse all CSS color names.

Frequently asked questions

What is the hex code for purple?

#800080. In CSS you can also use the keyword purple, which works in every browser.

What is purple in RGB and HSL?

In RGB it is rgb(128 0 128), in HSL hsl(300 100% 25%). For print, cmyk(0%, 100%, 0%, 50%) is a starting point, but CMYK depends on paper and ink, so check with your printer.

Should I use black or white text on purple?

White text works better: it has a contrast ratio of 9.41:1 and passes WCAG AAA. Black text reaches 2.22:1.

Which colors go with purple?

Its complementary color is #0C5D26, on the opposite side of the color wheel. For a calmer look, combine it with its analogous neighbors #5E21A6 and #8A144C. The palette generator builds more combinations.