Free Accessible CSS Gradient Generator

← All Colors
#800080 Purple

Purple Hex Code #800080

Purple is a dark, strong color with the hex code #800080. In RGB it is 128, 0, 128, and in HSL it is 300°, 100%, 25%. It is one of the 148 named colors in CSS, so you can write “purple” instead of the hex code.

HEX
#800080
RGB
rgb(128, 0, 128)
HSL
hsl(300, 100%, 25%)
HSV
hsv(300°, 100%, 50%)
CMYK
cmyk(0%, 100%, 0%, 50%)
CSS name
purple

CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.

About Purple

On a white background Purple has a contrast ratio of 9.42:1 (AAA), and on black 2.23:1 (Fail). White text is the better choice on top of it.

It sits between the warm and cool halves of the color wheel, so it pairs comfortably with either.

Purple combines the calm of blue with the energy of red. It reads as creative and premium, and is often used by design, media and beauty brands.

Good to know: CSS purple (#800080) is magenta at half intensity. It is redder than rebeccapurple (#663399).

Shades and tints of Purple

Tints mix Purple with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.

Color harmonies for Purple

These schemes are calculated from Purple on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.

Analogous

Open in the color wheel

Triadic

Open in the color wheel

Tetradic

Open in the color wheel

Square

Open in the color wheel

On the artist’s RYB wheel, the complement of Purple is #5A8000, close to the named color Olive Drab.

Purple contrast and accessibility

WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Purple scores against white and black.

Contrast of Purple with white and black
AgainstRatioAA normalAA largeAAA normalAAA large
White (#ffffff) 9.42:1 ✓ Pass ✓ Pass ✓ Pass ✓ Pass
Black (#000000) 2.23:1 ✕ Fail ✕ Fail ✕ Fail ✕ Fail
Aa White text on Purple9.42:1
Aa Black text on Purple2.23:1

Purple and color blindness

These are approximate previews of how Purple can look with the main types of color vision deficiency.

Protanopia #003D83

Purple changes noticeably.

Deuteranopia #304B7D

Purple changes noticeably.

Tritanopia #842149

Purple changes noticeably.

Achromatopsia #464646

Purple changes noticeably.

Gradients with Purple

Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.

Purple to a lighter tint

background: linear-gradient(135deg, #800080 0%, #cc99cc 100%);

Purple to its analogous neighbour

background: linear-gradient(135deg, #800080 0%, #800040 100%);

Purple to its complement

background: linear-gradient(135deg, #800080 0%, #008000 100%);

Colors similar to Purple

How each close match differs from Purple.

More purple colors →

Use Purple in code

CSS
.element {
  color: #800080;
  background-color: #800080;
  border-color: purple;   /* purple is a valid CSS color name */
}
CSS variable
:root {
  --color-purple: #800080;
}
Tailwind
<!-- Tailwind arbitrary values -->
<div class="bg-[#800080] text-[#800080] border-[#800080]"></div>

/* Tailwind v4 theme color */
@theme {
  --color-purple: #800080;
}

Purple questions

What is the hex code for Purple?

The hex code for Purple is #800080. In RGB that is rgb(128, 0, 128), and in HSL it is hsl(300, 100%, 25%).

What is the complementary color of Purple?

On the RGB (screen) color wheel, the complement of Purple is #008000, which is close to Green. On the artist’s RYB wheel it is #5A8000, close to Olive Drab.

Should I use white or black text on Purple?

White text. It has a contrast ratio of 9.42:1 against Purple, which is WCAG AAA. The other option scores 2.23:1.

Is Purple accessible as a text color on white?

Yes. Purple on white scores 9.42:1, which passes WCAG AA for normal text (4.5:1) and AAA (7:1).

What are darker and lighter shades of Purple?

Mixing Purple with black gives #660066, #4D004D, #330033, #1A001A (20% to 80% black). Mixing it with white gives #993399, #B366B3, #CC99CC, #E6CCE6 (20% to 80% white).

More color tools