> use something like colorname_identificator_path_filename as color > indetificator internally inside gui?
This doesn't work because in stdinsets we define the color for e.g. the greyed-out box as "gereyedouttext". If we would use another color name for every buffer the inset won't find the color. I therefore think that the easiest solution is to update all colors whenever a file is loaded or the file view is changed (when you switch between opened files using the tabbar).
Btw. do you have a starting point which routines are called by LyX when switching documents via the tabbar?
thanks and regards Uwe