Alan Happer, an organic chemist at the University of Canterbury, responded.

Butter is made from cream produced by cows and is yellow because cream is
yellow.

Cream is yellow because the cows eat grass containing a substance
called beta-carotene that is yellow. This may seem strange, because grass
looks green, not yellow. However the green material present (a substance
called chlorophyll) hides the yellow beta-carotene that is also there.
Why then, is butter yellow and not green? The answer is that the green
chlorophyll is broken down in the cow's stomach, but the yellow
beta-carotene is not. Instead it is dissolved in the cow's fat and turns up
eventually in the cream.

A question: Can you now suggest why the leaves on some trees are green in
spring and turn yellow in autumn?