We also noticed that the colour glitches in the text box keep changing for different leaders and
@Metro Polis figured out that it was the Heralds that were screwing up our GUI background elements.
As a result I think I've figured out exactly how the diplomacy screen palette works.
A top section used for leader heads that never changes.
A central area that's used for background graphics that never changes.
A bottom section (that we can't see) that is used by the Heralds and because the Heralds need more colours than what is available in this bottom area the bottom area colours are constantly swapped/interchanged for each Herald that's loaded.
So even if we were able to somehow get access to a Herald animation frame and steal it's palette it probably wouldn't mean horsehocky because its lower/bottom area palette wouldn't match the other heralds. Although I'd still be curious to see what it looks like. Does any one know how to access herald animation frames?
Our custom GUI uses creamy brown colours located right here..
Which when the diplomacy screen is loaded those colour slots fall right into that bottom mystery Herald area where the colours appear to interchange. And that presumably explains why our GUI text boxes keep changing into weird glitchy colours when a different Herald is loaded.
Anyway back to the main topic of the leader head portraits I think that if I combined the top pallet and the central palette (whos colours thankfully never change) into one unified pallet and then used that combined palette to convert the leader portraits it should gives better conversions. That central palette used on the diplomacy screen contains lots of yellows, some redish orange colours and some bluish greens that would likely help a lot with the conversions. Sadly the proper reds and greens appear to be presumably down in the bottom Heralds area where nothing is stable.
I'll see if I can create a combined palette and then apply it to a leader portrait and see if it works in the game. If it does I'll post the combined palette here for others to use.
If it turns out that there are a number of colours in the bottom area (we can't see right now) that do NOT change between the Heralds then they could be added to this combined palette as well, once again resulting in even better leader portrait conversions. But for that I'd need access to the Herald frames to see what palettes they use, and I have no idea how to access Heralds and their animation frames lol.
.