Here’s the two shader in action :
Faction color variation and outline.
You can also see the grey unit is “in the dark” as ambient light is taken into account.
These 2 shaders save me about 70% of textures on disk and up to 25% of ram for not having to load additional colors.
A lot of thanks !