It possibly could be from a fungus or bacteria in the egg such as staphylococcus, E.coli, or pseudomonas, especially if there is a rotten odor. Eating certain weeds can cause a blue green color. Here is some reading:
https://www.backyardchickens.com/articles/common-egg-quality-problems.65923/
http://www.thepoultrysite.com/publications/1/egg-quality-handbook/34/rotten-eggs/
http://www.hobbyfarms.com/the-freshly-laid-rotten-egg/
https://www.backyardchickens.com/th...s-laying-smelly-eggs-with-black-yokes.369427/
https://www.backyardchickens.com/articles/common-egg-quality-problems.65923/
http://www.thepoultrysite.com/publications/1/egg-quality-handbook/34/rotten-eggs/
http://www.hobbyfarms.com/the-freshly-laid-rotten-egg/
https://www.backyardchickens.com/th...s-laying-smelly-eggs-with-black-yokes.369427/