Purple Color Code: Hex #800080
The hex code for Purple is #800080 (the CSS keyword purple). Purple RGB code: rgb(128, 0, 128). The xkcd color survey gives #7E1E9C instead, which looks slightly different; both codes are below with their source.
#800080Top: the code browsers use#7E1E9CBelow: compare edge to edgePurple color codes: each Purple hex code in every format
Sources
Properties
- Hex codes
- 2 different ones in 3 color lists; they look slightly different
- Family
- purple
- Contrast
- 9.42:1 with white, 2.23:1 with black
- CSS keyword
- purple
- Character
- dark, vivid
- Readable text on it
- white (AA)
In the X11 list, purple was a bright violet, #A020F0; the web’s purple is the darker color from HTML, which X11 now calls Web Purple.
A dark, vivid purple with a warm cast. In code, purple gives exactly this web value. If you mean the color as people usually picture the name, the survey value #7E1E9C is closer: it is lighter and about as saturated.
White text reads best on it; black text does not pass WCAG AA. Its exact opposite on the color wheel cannot be shown on screens, so the complementary palette uses the closest displayable version. Even pale tints keep its hue, which makes it easy to use for soft backgrounds. Next to Dark Magenta, its closest named neighbour, it looks darker, more muted and neither warmer nor cooler; beside Rebecca Purple it looks about as light, more vivid and warmer. It is one of the 16 original HTML 4 color names.
Colors that go with Purple
Complementary: the opposite of Purple
#800080White text 9.42:1#005E23White text 8.00:1#BD81BABlack text 7.01:1#003711White text 13.51:1
Analogous
#5E21A6White text 9.36:1#800080White text 9.42:1#8E004CWhite text 9.31:1#D0A3CDBlack text 9.80:1
Triadic
#800080White text 9.42:1#614A00White text 8.44:1#005862White text 8.16:1#E2C5E0Black text 13.30:1
Monochrome
#1F001FWhite text 19.48:1#4D004DWhite text 14.76:1#800080White text 9.42:1#A95EA7Black text 4.85:1#D0A3CDBlack text 9.80:1
With neutrals
#800080White text 9.42:1#E2C5E0Black text 13.30:1#0B000BWhite text 20.61:1#846582White text 5.04:1
Preview
Heading on Purple
Body text on this color, 9.42:1.
ButtonHeading in Purple
Text in this color on white, 9.42:1.
ButtonTints and shades
#E2C5E0#D0A3CD#BD81BA#A95EA7#953A93#800080#660066#4D004D#350035#1F001F#0B000B
WhitePurpleBlack
Similar named colors
Where the name comes from
- Source: Wikipedia, “X11 color names” (checked 3 Nov 2026)
- Listed in CSS Color 4, xkcd color survey, meodai color-name-list. About these lists.
Try it: