A Bit About Palettes
Trying to be clear without getting into technical details that can be unnecessarily confusing ...
Basically images can be in one of two different color modes - RGB or Indexed. RGB stands for red, green, blue. In this context RGB means that the image can have millions of colors. Indexed means there is a limited palette.
An indexed image is limited to some specific number of colors - 256 colors in the case of the Civ3 pcx files. "Indexed" means that each color is assigned a numbered slot in the palette. "Put color #127 in this part of the picture" is sort of what the software is doing when it compares the image to the palette. The 256 color slots in the pcx palettes are numbered 0-255 (this has to do with the way the software handles numbers and how programmers think). So when we talk about the last two slots we're talking about whatever colors are indexed to 254 & 255.
Civ3 uses slots 254 & 255 for whatever needs to be transparent in the game. It doesn't matter what colors they are: "Make everywhere in the picture that is color #254 invisible". If you look at one of the terrain files (for example) you'll see lots of green and magenta. The Civ3 designers / programmers decided to put bright green and magenta in slots 254 & 255 because those two colors very rarely get used in any of the game images. They are bright and contrasty so it's easy to spot what will be invisible in the game.
Because Firaxis set up Civ3 that way we usually talk about green and magenta. But it's very very important to remember that "green & magenta" is a just shorthand way of saying "the colors used for transparency that are in either slot 254 or 255 of the indexed palette associated with this particular image". This will start to make more sense if we look at the specific images you were using. Because I work in GIMP you'll see references to "colormap". For our purposes that means the same thing as when people talk about a palette here in the C&C forum.
All three of these images are using the same colors for transparency as the original Firaxis files. Most creators here at CFC do this so that anyone else can see right away what we are doing when they look at our files. But it's not a requirement. look at the Chopper file -
I don't want to get too technical, but it's important to note that if there were more blacks somewhere else in the palette then you could have black in the image anyway. The problem with that is that it can be difficult while editing an image to be sure whether or not you are using the "transparent" black.
The software is dealing with numbers, not visual colors. we usually talk in terms of RGB numbers here on the forums - how much red, green, and blue are in that particular color. 0,0,0 would be pure black. 1,0,1 would probably look the same to our eyes, but to the game it's a different color. If your palette has 0,0,0 in more than one slot things can get very confusing for the program as well as you. So we always try to have colors in the last two slots that are very different from anything in the image itself as we want it to appear in-game.
Here's the colormap (palette) for your template:
So now we've got 5 images. Each has it's own unique palette. And - assuming all the greens and magentas are truly identical - there are 5 or 6 different colors in the two transparency slots. So what happens when we try to combine the 5 indexed images? Out of those possible choices for the last two slots which ones get selected? More broadly, what happens to
all the colors from the various palettes? The answer is simple. The palette of whichever image is used as the base (that all the other images are pasted into) is the one that gets used.
Whatever program you are editing these images in will try to match colors to some extent, but at some point it may fail & you'll end up with something unpredictably ugly. With these five images the blue and white from the template end up as the transparent colors. Which means anywhere those two colors are in the pasted images will end up being invisible in the game. Probably not what you would have wanted.
The solution is to use a base image that is in RGB mode. In this case changing the template image to RGB mode before the other images are pasted into it. After they are pasted in, the composite image needs to be changed to 256 color indexed mode. Otherwise Civ3 can't use it.
Reducing from RGB to 256 colors means that the software is trying to pick whatever it thinks are the best colors to keep. The composite image didn't actually have green and magenta anywhere in it. So they aren't in the indexed palette. Civ3 is going to think that whatever two colors happened to end up in the last two slots are meant to be used for transparency.
This is why it's probably better in the long run to have a template saved in RGB mode with two colors already in it that are meant from the very beginning to be transparent in-game.
It's important to start with a template that is in RGB mode. With millions of colors available it's extremely unlikely that the images you paste in are going to be visually degraded. After everything is in place then you can change the mode to 256 colors before you save it as a pcx.
Even though green and magenta are still there after changing modes they are not in the last two (transparency) slots. The colormap (palette) needs to be edited so that they are. All of these steps can be done in GIMP. But from what Bluemofia has said and others have said in other threads some programs can't do the palette editing & you would need to do so in another program.
Some people prefer to go ahead and reduce to 256 colors without bothering about the transparency slots, and then edit the palette to change those colors to green and magenta afterwards. In my experience, because I have no control over what colors the program puts into slots 254 & 255 there can sometimes be a lot of cleaning up to do wherever those two colors are used in the image. Other people will recommend forcing the editor to reduce to 254 colors instead of 256. Then you would have to actually edit the palette to add two colors at the end. I've found it better in the long run to include green and magenta somewhere in the image whenever possible before changing modes. With a 'pedia icon - for example - a big dot of each in that white space will make sure magenta & green end up in the palette. Then you can easily go back and paint those dots to match the rest of the background. And the palette itself might need two colors rearranged, but at least they are all already there.
This is just the way that has worked most efficiently for me over the last 8 years or so. Once you understand enough about palettes to experiment with and develop your own work flow you may find a procedure that is better for you. Especially if you are working with a different set of programs than I use.