Why do peas change colour?
Chlorophyll is a dye that makes leaves green, it plays a key role in photosynthesis. It is present also in unripe fruits, young peas etc. Maybe I should say chlorophylls, because it is a group of similar chemicals. They get degraded by heat. 

(No assistence of microbes needed).

Bonus: Chlorophyll contains magnesium at the molecule core, which facilitates the green color. There were some creative people, who were upset, that the canned cucumbers are not green enough, so they added some copper-containing molecule during canning. It replaced magnesium and was more stable, so beautiful bright green cucumbers were on the market for a while. However, they turned out to be slightly poisonous and are not sold anymore.

Bonus 2: Most varieties of peas change color also naturally as they rippen. The seeds become yellow. The chlorophyll gets degraded in plant metabolism. The chloroplasts, i.e. the cell organelles responsible for photosynthesis change function to become storage organelles called leucoplasts.

(Edit: Ooops, I first wrote that chlorophyll supposedly contains iron. That was wrong, it is magnesium. Iron is present in a similar die called heme, which makes blood red. Probably I am getting too old :-) )