Purple Color Code (#800080)

Purple is #800080 in hex and rgb(128, 0, 128) — a dark magenta. Below: every color format, tints and shades, harmonies and how readable it is as text.

Updated

Purple
#800080
CSS namepurple
Hex#800080
RGBrgb(128, 0, 128)
HSLhsl(300 100% 25%)
HWBhwb(300 0% 50%)
CMYK0%, 100%, 0%, 50%

Tints and shades

Color harmonies

About Purple

Purple (purple) is a dark, vivid magenta with the hex code #800080, or rgb(128, 0, 128). In HSL it sits at a hue of 300°, 100% saturation and 25% lightness. It is one of the 148 named colors every browser understands, so you can write color: purple; instead of the hex value.

Using Purple for text and backgrounds

PairingContrast ratioWCAG
Purple text on white9.42 : 1AAA
Purple text on black2.23 : 1fails

On a purple background, use white text (9.42 : 1). WCAG asks for at least 4.5 : 1 for body text and 3 : 1 for large text. Check other pairs with the Contrast Checker.

CSS

.element {
  color: purple;               /* or #800080 */
  background-color: #800080;
  border: 1px solid rgb(128 0 128 / 50%);
}

Similar named colors

Dark Magenta (#8b008b), Indigo (#4b0082), Rebecca Purple (#663399), Medium Violet Red (#c71585), Dark Slate Blue (#483d8b), Dark Violet (#9400d3).

Color Name FinderPaste a HEX code to get its closest human-readable name and clean token names for your CSS, SCSS, JavaScript or Tailwind config.
Open the tool

Frequently asked questions

What is the hex code for purple?
#800080 — that is rgb(128, 0, 128) and hsl(300, 100%, 25%). In CSS you can also just write purple.
Is purple text readable on white?
Its contrast ratio on white is 9.42 : 1, which passes WCAG AA for normal text.
What colors go well with purple?
Its complementary color is #008000; analogous colors #400080 and #800040 sit next to it on the color wheel.