The green color in unripe bananas comes from chlorophyll, the same pigment that gives green leaves their color.
As bananas ripen, the chlorophyll breaks down and disappears, revealing the yellow color which has becn there all along.
The yellows and oranges of autumn leaves are also revealed as their chlorophyll breaks down.
Of course, other changes also occur as bananas
ripen: the starches change to sugar and the nesh ens as pectin la carbohydrate breaks down.