The point is that leaves contain special pigments, i.e. chemical compounds, which undergo transformation under temperature change. So that's just chemistry
. Visit our blog, soon we'll post a detailed article on this topic. Meantime here's explanation why plants are green
, which is closely related to your question.