What makes carrot bits turn green in carrot pineapple bread? (And are they safe?) Sometimes, a couple of days after its cooked, the carrot bits inside a carrot pineapple bread turn green.

Normally, I'd assume that a food that doesn't start green and winds up that way is moldy, but, A) it's only happening to the carrots, and B) it's happening inside the loaf, not on the outside, and it doesn't look like mold- more like the carrots themselves are changing color.

What's causing this, and is it still ok to eat?

In case it matters, the other ingredients are vegetable oil, cinnamon, salt, eggs, sugar, baking soda, baking powder, flour, and vanilla.
Here is a super in-depth analysis of what may cause the carrot to turn green:

http://www.carrotmuseum.co.uk/turngreen.html

Unfortunately, it doesn't come to any hard conclusions. It does make it clear that it's not simply pH though, as a carrot will remain green even in a 0.1 M solution of sodium hydroxide.

It does provide an anecdote about a baker that had a similar issue, and how they solved it:


  [they overcame] it with a change in formula of baking powder and a good clean out of equipment.


Perhaps this could apply in your case? It might be a reaction from your cookware in combination with other factors? What if you remove the pineapple? Does it still happen? Perhaps trying a different brand of baking powder may work.

One thing is for sure, it's definitely not mold, and I'm very confident that it's harmless.