Butter was big business, and the notion that a cheaper substitute, even one made in part with milk, might storm the market terrified dairy farmers. They didn’t take the threat lying down, though, and convinced legislators to tax margarine at a rate of two cents per pound—no small sum in the late 19th century. Dairy farmers also successfully lobbied for restrictions that banned the use of yellow dyes to make margarine look more appetizing. By 1900, artificially colored butter was contraband in 30 U.S. states.
Several states took even more extreme measures to turn consumers away from margarine—they required the product to be dyed an unappealing pink color.
The margarine industry fought back, however. Read the whole sordid story at mental_floss. Link