Research for the historical novel, Ruby, I'm writing has been fun although it does slow me down. The little details are fascinating. I owe this discovery to a lady at our church who is just a few years older than I and remembered having to take what she called lard and mix it with a little yellow capsule of dye to make it look like butter.
Margarine actually got its start in France in the late 1860s in response to a challenge posed by Napoleon for a cheaper spread than butter that could be used in the military. Hippolyte Mege-Mouries responded with a combination of animal fats and a few other things. He named it margarine.
Later it was found that vegetable oils were even cheaper and hydrogenation made them into a solid. The new margarine was introduced into the United States in the 1870s. When the new margarine became an even less expensive alternative to butter, the dairy association protested and brought laws into effect that prohibited the use of yellow dye in its production to distinguish it even more from the butter product. The work-around was to package a capsule or wafer of yellow dye with the margarine and let the consumer add it to the margarine. Of course the job usually fell to the children of the home which is why my friend remembered it so well.
When butter was rationed during WWII, margarine became the alternative and was popularized even more in 1941 by the National Nutrition Council who declared it to be healthier. Lots of people objected to the flavor of the margarine however and I'm sure my dad had to be one of them. When the flavor was improved he still objected to not having "real butter" in the house. My mother insisted that she only used it for cooking when he found it in the refrigerator and then quickly unwrapped the stick and put it on a butter dish so he wouldn't know he was using the margarine. I'm not sure if he gave in or truly didn't know. I'm thinking he gave in. Dad grew up on a farm and while not in Wisconsin (who didn't lift the ban on yellow coloring until 1967), he still would have know the difference, I'm sure.