A

The difference in color is primarily due to the higher fat content of butter. Cows that eat grass and flowers store the yellow pigment beta carotene, found naturally in those plants, in their fat. The pigment gets carried over into the fat in their milk. Milk consists mostly of water, with just over 3 percent fat in whole milk; cream is usually about 30 to 40 percent fat; and butter contains at least 80 percent fat.

The fat globules suspended in milk or cream are surrounded by a thin membrane that, in essence, ends up hiding the beta carotene pigment. This structure reflects light in such a way that the milk looks white.

Making butter requires churning cream, and during that agitation process “you break the membrane apart, and the fat globules cluster together,” said Elaine Khosrova, the former editor of the publication culture, about cheese making, and author of the new book “Butter: A Rich History.” “That’s the goal of butter making: to break that membrane.” In doing so, you expose the beta carotene, she said. When you separate out the buttermilk after churning, what remains is mostly butterfat, which is the most yellow of all.

You may notice, however, that butter from sheep’s milk, goat’s milk or water buffalo’s milk is white. Those animals don’t store beta carotene the way cows do. Instead, they convert it to vitamin A, which is colorless.

If cows are raised on pasture, their butter is more yellow when the milk is collected in late spring or summer, when the cows have more beta carotene-rich forage to chew on. In wintertime, even cows raised on pasture are usually brought inside and fed grain, which doesn’t have much beta carotene. Some dairies freeze butter so they can sell the yellow-tinged kind year-round.

But, of course, many industrial dairy producers raise cows without ever putting them out on pasture, in which case seasonality makes no difference. Those butters, which are quite common in grocery stores, aren’t very yellow at any point in the year.

“In agricultural communities, every spring their butter was prettier: more yellow,” Ms. Khosrova said. “It’s interesting that we’ve gotten used to pale butter. Now with the rise of artisanal butters that are more golden and yellow, chefs want that on the table, so I really wonder if companies will start sneaking in more color.”

Some commercial dairy producers do add color, usually annatto, which is also sometimes added to cheeses to give them a yellow-orange hue. Annatto is a derivative of seeds from the achiote tree, which is native to Central and South America and grows in tropical regions.

“Seeing the color could affect how our brains perceive the taste,” said J. Kenji López-Alt, the managing culinary director of Serious Eats and the author of "The Food Lab: Better Home Cooking Through Science."

“So if you have that association, it could make your enjoyment of the butter higher.”