#800080: CSS purple color codes, contrast and shades
By TechCompare · Updated · How we check
#800080 is rgb(128, 0, 128), the CSS named color purple. It's dark enough for white text, at 9.42:1, while black text gets only 2.23:1.
Color Codes
- HEX
#800080 - RGB
rgb(128, 0, 128) - HSL
hsl(300, 100%, 25%) - OKLCH
oklch(42.09% 0.1935 328.36)
Text on #800080
White Text
Aa
The quick brown fox jumps over the lazy dog.
9.42:1APCA Lc -94.1
- AA Normal (4.5:1)Pass
- AA Large (3:1)Pass
- AAA Normal (7:1)Pass
- AAA Large (4.5:1)Pass
Black Text
Aa
The quick brown fox jumps over the lazy dog.
2.23:1APCA Lc 14.4
- AA Normal (4.5:1)Fail
- AA Large (3:1)Fail
- AAA Normal (7:1)Fail
- AAA Large (4.5:1)Fail
WCAG 2 ratios are the same whichever color is the text, so they also hold for #800080 text on a white or black page. APCA is a newer method that isn't part of any WCAG standard, and a minus sign means light text on dark.
#800080 mixes equal amounts of red and blue, 128 each, with no green. That gives a deep purple that leans toward magenta. It's dark mostly because green is off: green carries most of the brightness your eye sees, so a color without it looks dim. The cards above give its codes and test white and black text on it. Below are 4 lighter and 4 darker shades.
Shades
Same hue and chroma in OKLCH, with even steps of lightness. Open any shade in the Color Picker.
Nearest Named Colors
CSS Name
purple
#800080
ExactΔE OK 0.000Tailwind 4
fuchsia-900
oklch(40.1% 0.17 325.612)
CloseΔE OK 0.032Tailwind 3
fuchsia-800
#86198F
CloseΔE OK 0.034
About #800080
CSS's purple comes from the old VGA palette that HTML adopted. The X11 color list, where most other CSS names come from, had its own purple, #A020F0, a brighter violet. CSS kept the VGA value. Gray, green and maroon have the same split, so a color name in an old X11 or Unix tool may not match the one in your browser.
For text, WCAG 2 is clear: white scores 9.42:1 and passes AAA, black gets 2.23:1 and fails. APCA, a newer method that isn't part of any WCAG standard, scores white text Lc -94.1, well past its body text level. The ratio works both ways, so purple text on a white page passes AAA too.
Tailwind has no exact match. The nearest in Tailwind 3 is fuchsia-800 (#86198F), 0.034 away in OKLab.
Verdict
Use #800080 for buttons with white labels, headings, links and dark banners. Keep black text off it.
For a lighter purple that still takes white text, #AD3DAB is as far as you can go, at 5.21:1. The next step, #DB6AD8, drops to 2.97:1 and needs dark text instead. The darker steps all keep white text past AAA, so they suit hover and pressed states. Click a shade to open it in the Color Picker.
More Color scenarios
Related guides
Frequently asked questions
What color is #800080?
Why is CSS purple different from X11 purple?
What text color works on #800080?
Related tools
Contrast Checker
Check color contrast ratios for WCAG AA/AAA accessibility compliance.
Use toolJSON Formatter
Validate, format, and minify JSON. Browse it as a tree, run JSONPath queries, compare two documents, or validate against a JSON Schema.
Use toolAspect Ratio Visualizer
Visually compare width differences between 16:9, 21:9, and 32:9 monitors.
Use tool