About purple
CSS purple (#800080) is equal parts red and blue at about half strength. It is one of the 16 HTML 4 color names.
Lighter or bluer purples in CSS include mediumpurple (#9370DB), rebeccapurple (#663399) and blueviolet (#8A2BE2), and indigo (#4B0082) is a deeper, darker one.
Shades and tints of purple
Purple lands on the 900 step. The steps follow a lightness curve modeled on Tailwind CSS's default palette; build your own in the Tailwind color generator. For purple mixed with white, black or gray in even steps, use the tint and shade generator.
Colors that go with purple
Partner hues are picked on the OKLCH color wheel at a mid lightness, because purple itself is very dark.
Complementary: the opposite hue
Open in the palette generator · Compare the screen and painter's complements of purple
Analogous: neighboring hues 30° either side
Open in the palette generator · See analogous and monochromatic colors of purple on three wheels
Triadic: three hues 120° apart
Split complementary: the two hues beside the complement
Text on purple
| Text | Ratio | AA normal | AA large | AAA normal |
|---|---|---|---|---|
| White | 9.42:1 | Pass | Pass | Pass |
| Black | 2.23:1 | Fail | Fail | Fail |
The ratio is the same either way round, so purple text on a white background is also 9.42:1. Check other pairs in the color contrast checker.
Similar named colors
The CSS named colors closest to purple, by deltaE OK distance.
See all 148 on the color names page.
Closest Tailwind CSS colors
fuchsia-900 v4: fuchsia-900, #721378, deltaE OK 0.032
fuchsia-800 v3: fuchsia-800, #86198F, deltaE OK 0.034
In Tailwind CSS v4 it is fuchsia-900 (#721378), and in v3 fuchsia-800 (#86198F). For the exact color, use an arbitrary value such as bg-[#800080]. A deltaE OK of around 0.02 is roughly the smallest difference most people notice side by side. Browse every shade on the Tailwind CSS colors page.
Purple with color vision deficiency
An approximation of how purple may look with protanopia, deuteranopia and tritanopia (simulated with Machado, Oliveira and Fernandes, 2009), and with achromatopsia, shown as a gray of the same luminance.
Test a whole palette or image in the color blindness simulator.
Using purple in code
.example {
color: purple; /* named color */
background-color: #800080; /* hex */
border-color: rgb(128, 0, 128);
}
