Purple
Hex #800080, rgb(128 0 128). A purple CSS named color.
Open in palette generatorPurple color codes
Click any value to copy it.
- HEX
- RGB
- HSL
- HSV
- HWB
- CMYK
- OKLCH
- OKLab
- Lab
- LCH
- CSS keyword
About Purple
Purple is a dark saturated purple with the hex code #800080. In RGB it is made of 128 red, 0 green and 128 blue; in HSL its hue is 300°, with 100% saturation and 25% lightness. Its perceptual lightness (OKLCH L) is 42.1%.
It is a CSS named color, so you can write "purple" anywhere CSS accepts a color. Against white it has a contrast ratio of 9.42:1 and against black 2.23:1, so white text reads better on it and passes WCAG AA for normal text.
Tints, shades and tones
Purple mixed step by step with white, black and middle gray (#808080).
Tints (with white)
Shades (with black)
Tones (with gray)
Purple 50-950 scale
A Tailwind-style scale built in OKLCH; the original color sits on the step with the closest lightness.
Colors that go with Purple
Color harmonies rotate the hue in OKLCH and keep the lightness and chroma. Each color links to its closest named color.
Complementary
Analogous
Split complementary
Monochromatic
Contrast and readability
WCAG 2 contrast of Purple with white and black. The readable text color on Purple is white.
On white9.42:1
- AA pass
- AA Large pass
- AAA pass
- UI 3:1 pass
APCA Lc 90
On black2.23:1
- AA fail
- AA Large fail
- AAA fail
- UI 3:1 fail
APCA Lc -13
Test any pair in the contrast checker.
Color blindness preview
How Purple appears with each type of color vision deficiency (simulated with the Machado model).
- Protanopia#003D83
- Deuteranopia#304B7D
- Tritanopia#842149
- Protanomaly#3F3681
- Deuteranomaly#4B417E
- Tritanomaly#83126B
- Achromatopsia#464646
Colors similar to Purple
The closest named colors by perceptual difference (OKLab).
Use Purple in CSS and Tailwind
.purple {
color: purple; /* #800080 */
background-color: rgb(128 0 128);
border-color: oklch(42.1% 0.193 328.4);
}/* Tailwind CSS v4: bg-purple-500, text-purple-700... */
@theme {
--color-purple-50: #FFF7FE;
--color-purple-100: #FFE4FD;
--color-purple-200: #FBC9F8;
--color-purple-300: #F69CF2;
--color-purple-400: #E759E5;
--color-purple-500: #D91CD9;
--color-purple-600: #BE00BE;
--color-purple-700: #9C009C;
--color-purple-800: #800080;
--color-purple-900: #670767;
--color-purple-950: #2A002A;
}
<!-- or the exact color, no config -->
<div class="bg-[#800080] text-[#FFFFFF]">…</div>