Purple color #800080
rgb(128, 0, 128) · oklch(42.1% 0.193 328.4)
Purple (#800080) is a dark, vivid, cool purple. It mixes 50% red, 0% green and 50% blue, with a perceived lightness of 42.1% in OKLCH. White text reads best on it (9.41:1 vs 2.22:1). The closest other CSS color is Dark Magenta (#8B008B). For people with protanopia it shifts the most, toward #003D83.
Purple color codes
| HEX | |
|---|---|
| RGB | |
| HSL | |
| HSV / HSB | |
| OKLCH | |
| CMYK | |
| CSS keyword |
Click a value to copy it. Convert any other color with the color converter.
Shades, tints and tones of purple
Shades mix purple with black, tints mix it with white, and tones mix it with gray. Mixing happens in OKLab, so the steps look evenly spaced.
Tints (lighter)
Shades (darker)
Tones (muted)
Purple as a UI color scale (50–950)
An 11-step scale for design systems, with purple placed at step 800. Copy it as a Tailwind v4 theme below.
Colors that go with purple
Harmonies are computed on the OKLCH hue wheel, keeping purple’s lightness and saturation where the sRGB gamut allows. Open any row in the palette generator to adjust it.
Complementary
EditThe base color and the hue directly opposite it. Maximum contrast; use one as the accent.
Split complementary
EditThe base plus the two hues beside its complement (±30°). Contrast with less tension than complementary.
Tetradic (rectangle)
EditTwo complementary pairs (rectangle: 0°, 60°, 180°, 240°). Rich; needs one dominant color.
Is purple accessible? Contrast with white and black
9.41:1
AA pass AA large pass AAA pass
2.22:1
AA fail AA large fail AAA fail
- As a background, purple works best with white text.
- For body text on black, use the lighter variant .
How purple looks with color blindness
Simulated with the Machado et al. (2009) model. Around 1 in 12 men and 1 in 200 women have some form of color vision deficiency.
#003d83 Red-blind. Reds look dark and brownish; red and green are easily confused.
#304b7d Green-blind, the most common strong form. Red, green, orange and brown look similar.
#842149 Blue-blind and rare. Blue and green are confused, as are yellow and pink.
#464646 Total color blindness, very rare. Only lightness differences are visible.
Colors similar to purple
The closest CSS named colors by perceptual distance (ΔE OK; under 2 is hard to tell apart).
Use purple in CSS and Tailwind
CSS custom properties
:root {
--purple: #800080;
--purple-rgb: 128 0 128;
}
.text-purple { color: var(--purple); }
.bg-purple { background-color: var(--purple); }
Tailwind v4 theme
@theme {
--color-purple-50: #f8f6f7;
--color-purple-100: #f1eaf1;
--color-purple-200: #ecd1ea;
--color-purple-300: #eea3ea;
--color-purple-400: #f744f6;
--color-purple-500: #d800d8;
--color-purple-600: #b400b4;
--color-purple-700: #8d178c;
--color-purple-800: #800080;
--color-purple-900: #501d4f;
--color-purple-950: #2e132d;
}
Make a gradient from purple: open the gradient generator.
Painting in Procreate or designing in Photoshop? See our palette packs: every color with HEX codes is free to browse, and the swatch files are a quick download.