Talk markers over the heads

Hello, I have a question about these conversation markers over their heads.

As we all know, there are the question marks, exclamation points in yellow and gray, for the quests.

And then the marker for conversations in green and gray, like a diamond.

When I talk to a person who has something to say, she has this green marker. When I finish talking, it turns gray.

Some NPC will remain gray even after changing city or even ending the game. Others, however, turn green again after city or game change. But the NPC does not really have anything new to tell, still the same.

Is there some reason or logic behind this behavior that some markers turn green again, why is that?