It was named after the Battle of Magenta, a battle fought in 1859 in the town of Magenta, Italy, during the Second Italian War of Independence. The color was first synthesized in 1859 by Sir William Henry Perkin, a British chemist.
Perkin noticed the bright purplish-red color when experimenting with coal tar and named it "mauveine," but it was later renamed "magenta" to reflect its association with the battle.