Sawik already kinda explained it, but technically the colours work for everything that enters your focus (whose name is displayed, that is).
It might not work for your NPCs because our method of determining which colour to use is based on attitudes which I think are not actually implemented in Gothic i.e. Gothic doesn't use them. When we first developed the script we had to implement them ourselves (Gottfried and me that is). You can choose any other way you like to decide which colour to use, e.g. npctype (NPC_FRIEND or so would be green) or other things. The same goes for items though they obviously have neither an attitude towards the player nor an npctype, but you could for example just write it in the scripts which colour they should be (there are several unused variables in C_ITEM, e.g. weight, so you just do weight = 1; for green colour or so) and then you just check which value itm.weight has and set the colour accordingly.
However, this does require you to change the script which might need a basic understanding of Ikarus.
That was a really brief description, if you need more help concerning one of the things I mentioned just ask, I'm sure someone here including me will answer soon