This isn't caused by the color of the name tag, it's actually caused by the team in which the entity having the name tag is in. F1 will hide an entity's name tag by default, but as soon as the entity joins a team, it will be shown regardless of F1 being active or not.
This behaviour may or may not be intended; anyway, can confirm for MC 1.12.1.
relates to MC-55767