At the time, it was unlawful in many places to sell oleomargarine already colored yellow. It often came with a little packet of coloring instead.
As you might guess, this was the doing of the dairy lobby.
ps.: Another powerful yellow food colorant is beta carotene in small concentrations.
I grew up on home made butter and could never understand why anyone would want to color oleo since coloring did nothing to improve its flavor. Then when I was introduced to commercial butter, I discovered that flavor did not make any difference. The only thing I ever found that compared to home made butter flavor was Grade B butter which was made from sour cream. Only found it once. Nobody will buy anything that is labeled Grade B, no matter how good it is.
I grew up on home made butter and could never understand why anyone would want to color oleo since coloring did nothing to improve its flavor. Then when I was introduced to commercial butter, I discovered that flavor did not make any difference. The only thing I ever found that compared to home made butter flavor was Grade B butter which was made from sour cream. Only found it once. Nobody will buy anything that is labeled Grade B, no matter how good it is.