Your green tinged onions are safe. When onions are stored, they often begin a new growth cycle instead of staying nicely dormant and waiting for us to use them. They turn greenish, send out roots, and begin to grow stems again.
We often eat young, green onions as a deliberate choice, unlike green potatoes or potato sprouts. These should never be consumed.