Hindy- here are the results of my research: If the garlic is not fully ripe and dry, it can turn green in the presence of sunlight or heat due to the formation of a chlorophyll like compound. This same reaction can happen in the presence of acidic foods like vinegar, onions, lemon juice, etc. or with copper found in some utensils and/or tap water. It is harmless and can be fixed by either letting the garlic mature (at room temperature) or heating it more until the proper color is achieved.
Read more HERE.
~ Gloria Kobrin of “Kosher Cookbook”