#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.

#800080

Color Codes

  • HEX#800080
  • RGBrgb(128, 0, 128)
  • HSLhsl(300, 100%, 25%)
  • OKLCHoklch(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
Check White Text in Contrast Checker

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
Check Black Text in Contrast Checker

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.

  1. #FFE9FF
  2. #FF96FF
  3. #DB6AD8
  4. #AD3DAB
  5. Base#800080
  6. #760077
  7. #6C006C
  8. #5F0060
  9. #530054

Nearest Named Colors

  • CSS Name

    purple

    #800080

    ExactΔE OK 0.000
  • Tailwind 4

    fuchsia-900

    oklch(40.1% 0.17 325.612)

    CloseΔE OK 0.032
  • Tailwind 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

Hex to RGB
A hex color code is three RGB numbers written in base 16.
View details
RGB vs CMYK
Screens add light and print adds ink. See one color in both, and why a plain CMYK formula can't promise a print match.
View details
HSL color model
Hue, saturation and lightness, with three live sliders and a table of common colors in hex, RGB and HSL.
View details

Frequently asked questions

What color is #800080?
A deep purple: rgb(128, 0, 128), hsl(300, 100%, 25%) or oklch(42.09% 0.1935 328.36). It's the CSS named color purple.
Why is CSS purple different from X11 purple?
CSS took purple from the VGA palette that HTML adopted early on, where it's #800080. The X11 color list used #A020F0, a brighter violet. When CSS added the X11 names, it kept the older VGA value for purple.
What text color works on #800080?
White. It scores 9.42:1 and passes AAA. Black gets 2.23:1 and fails WCAG at every size.