Purple
Purple is a dark, vivid color. Hex code #800080.
Purple color codes
- CSS name
purple - HEX
#800080 - RGB
rgb(128, 0, 128) - HSL
hsl(300, 100%, 25%) - OKLCH
oklch(42.1% 0.193 328.4)
HSB and CMYK values
- HSB / HSV
hsb(300, 100%, 50%) - CMYK
C0 M100 Y0 K50
White text
9.41:1 · passes WCAG AAA
Black text
2.22:1 · fails WCAG
Shades of purple
A darker shade of purple is #3C003C (800), and a lighter one is #BC4DBA (400).
Colors that go with purple
Complementary
Analogous
Triadic
The complementary color of purple is #008000, which is green.
Click a color to copy its hex code.
Colors similar to purple
- Dark magenta#8B008B
Slightly lighter
- Rebecca purple#663399
Slightly lighter, more blue, more muted
- Indigo#4B0082
Darker, more blue
- Dark slate blue#483D8B
More blue, more muted
- Dark violet#9400D3
Lighter, less pink, more vivid
- Dark orchid#9932CC
Lighter, less pink, more vivid
Each compared with purple.
About this color
Purple in CSS and design
Purple is one of the 16 basic color keywords, which come from the VGA palette by way of HTML. These four lines all give the same purple:
color: purple;
color: #800080;
color: rgb(128, 0, 128);
color: hsl(300, 100%, 25%);What to know about purple
The word purple goes back to Latin purpura and Greek porphyra, which also name the mollusks that gave the Tyrian purple dye of ancient times. CSS purple, #800080, is red and blue at half strength. The X11 color list defines purple as a brighter, bluer #A020F0, but CSS kept the darker purple of its 16 basic colors.
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) and in HSL hsl(300, 100%, 25%). In CMYK it is about C0 M100 Y0 K50, though printed colors vary with paper and ink.
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.
What is the complementary color of purple?
#008000, which is green. It sits opposite purple on the color wheel: the hue turned 180 degrees, with the same saturation and lightness.
Which colors go with purple?
For strong contrast, pair it with its complementary color #008000. For a calmer look, combine it with its analogous neighbors #400080 and #800040. The palette generator builds more combinations.