It has no effect in game, it's only for convenience so you easily recognize friends and enemies.You could use the colors for any other purpose.
Doesn't it affect how mercs/slaves will react depending on their stance?