Bananas can turn purple when cooked or baked due to a chemical reaction that occurs between their natural pigments and the heat applied during the cooking process. This reaction is known as enzymatic browning.
Bananas contain an enzyme called polyphenol oxidase (PPO), which is responsible for the browning process. When the banana is cut or exposed to heat, the enzyme comes into contact with oxygen in the air, causing a chemical reaction to take place.
The natural pigments present in bananas, such as phenols and tannins, react with the oxygen and the PPO enzyme. This reaction leads to the formation of melanin, a pigment responsible for the brown coloration. However, depending on the specific banana variety and its chemical composition, the resulting color may vary.
In some cases, when exposed to heat during baking or cooking, the bananas may take on a purplish hue instead of the typical brown color. This purple coloration can be attributed to the interaction of the banana's natural pigments and the chemical changes occurring during the cooking process.
It's worth noting that not all bananas turn purple when cooked or baked. The extent and color of the browning can vary depending on the banana's ripeness, variety, and the specific cooking method employed.