Margarine arrived in America in the 1870s as an affordable alternative to butter that also provided Chicago's meatpacking industry with a profitable use for surplus animal fat. Created by French chemist Hippolyte Mège-Mouriès in 1869, this butter substitute’s quick rise in popularity caught the attention of dairy farmers who saw margarine as a threat to their livelihoods. They lobbied for regulations to restrict margarine's appearance and sale, resulting in the Oleomargarine Act of 1886, which imposed a tax on margarine and required licenses for manufacturers and sellers. The rules even fostered a black market, with some bootleggers winding up in federal prison. At the state level, 32 states passed so-called anti-color laws prohibiting the sale of margarine tinted yellow to look like butter (oleomargarine is naturally white), with some states requiring margarine be colored bright pink—though this was later overturned by the U.S. Supreme Court. Laws about margarine’s color remained largely unchanged until the Great Depression and World War II, when butter shortages made margarine essential. In 1967, dairy state Wisconsin was the last state to repeal the restrictions on margarine.
Additional Source: Tax Reform With a Side of Margarine