Tool or script to reorder colors in palette
Hi. I often come at the case when I need to do this. When I have a sprite with a background let's say this sprite, where the wood is the item and the magenta is the BG color. As can be seen on the palette the magenta is 13th color on the top.
For some game engines I need this color to be first.(in some game engines and tools it may also appear as last color e.g bottom right corner).
With a bit of help I created a python script to batch process many images. So I can make the first color (now orange) go to index 13 and Magenta go to first.
In a tool where I use it one by one it may seem I change order because as in the image if I just swap colors, the background becomes too close color to the rest. It can be black or the wood colors in this case.
So it is not color swap that I need? Is there an reorder way>?
it can be a script or a tool, looking for anything, Irfan view just cant do that.
Well, changing the palette is not enough, you also have to adapt the indices of the pixels.
mtPaint is capable of changing the order, when you press shift and drag a color in the palette.
Grafx2 allows to swap two colors in the palette with or without also changing the pixels.
I just realized what im doing wrong.. If I swapped color values within palette then magenta would be black (if thats 1st color) and black would be magenta, so that affects the image and it becomes a mess.. like all my dark places using the black become magenta.
GIMP has the rearrange color map, where you drag the color you need first and it doesnt touch the image itself. Good I don't need extra tools or the ones you suggested but didnt know GIMP has that. Now I will only look if a script can do this as batch process,
If it would not touch the image, the pixel's colors would change.