Bob plays Giant Growth (a green spell) on an artifact that's been turned into a creature, giving the creature +3/+3 until end of turn. If Bob gives the creature protection from green later in the turn, that doesn't end the Giant Growth's effect. If the artifact stops being a creature later in the turn, the +3/+3 effect will become dormant, but it will reapply if the artifact becomes a creature again before the end of the turn.