Be wary that ruling clans have their personal banner that's totally different from the faction banner, if they lose the throne to another clan, they revert to their personal clan banner, while the new ruling clan drops its own and takes faction banner as clan banner.
You can check their personal banners in spclans.xml, copy the banner code and then paste it
here
Don't know about color switching bug though.
EDIT: On 1.5.6 the primary and secondary color of the background layer seems to have switched places in the banner editor (now the primary is up, secondary below)
EDIT 2: some factions' clans have the purple as default background color and they rely on game applying the correct faction color to its background upon game loading, so often a fix is simply saving and reloading the savegame when that happens mid-game