Purple #800080

Purple color (#800080)

Purple is one of the 148 CSS named colors. Use the keyword purple anywhere CSS accepts a color, or its hex code #800080, which is rgb(128, 0, 128) in RGB.

It is a dark, vivid cool color with a hue angle of 300° on the HSL color wheel and a perceived lightness of 42% in OKLCH. On a purple background, white text gives the higher contrast at 9.41:1, which passes WCAG AA for normal text.

Purple color codes

CSS name purple
HEX #800080
HEX (8-digit) #800080FF
RGB rgb(128, 0, 128)
HSL hsl(300, 100%, 25%)
HSV / HSB hsv(300, 100%, 50%)
OKLCH oklch(42.1% 0.1935 328.4)
CMYK cmyk(0%, 100%, 0%, 49.8%)

Contrast with white and black

WCAG 2 contrast ratios and APCA lightness contrast (Lc) for purple used as text and as a background.

Aa Sample text
Purple text on white
9.41:1 WCAG Lc 89.6 APCA Passes AA
Aa Sample text
Purple text on black
2.22:1 WCAG Lc -12.7 APCA Fails AA
Aa Sample text
White text on purple
9.41:1 WCAG Lc -94.1 APCA Passes AA
Aa Sample text
Black text on purple
2.22:1 WCAG Lc 14.4 APCA Fails AA

Tints and shades of purple

Tints mix purple with white; shades mix it with black, in 10% steps. Click a swatch to copy it, or build custom scales in the tint & shade generator.

Tints

Shades

Colors that go with purple

Harmonies calculated on the HSL color wheel. Explore more in the color scheme generator.

Complementary

Analogous

Triadic

Split-Complementary

Purple with color blindness

Approximately how purple appears with each type of color vision deficiency. Test full designs with the color blindness simulator.

Using purple in CSS

.element {
  color: purple;
  background-color: #800080;
  border-color: rgb(128 0 128 / 50%);
  outline-color: oklch(42.1% 0.1935 328.4);
}

Similar named colors

See all shades of purple or browse every CSS color name.

Related tools