Previously I wanted to swap color values in palette of indexed color map but that seems to be not what im looking to do... as then colors on the image also swap (black becomes magenta and magenta becomes black, it's a mess). I need to arrange colors order in palette, or particularly move Magenta color to be first color of already indexed image.
GIMP has Map - Rearrange Color map, a window allows you to drag your Magenta to be first (Index 0) and then you have it first, no actual color value swap, just order in the color map. But that's not a batch process, thus looking for a script.
But can Python do it with GIMP using the Rearrange color (find Index# containing 255,0,255 that will be different Index # for each opened image) and then move Index# to first image for each opened image, then save/export all png's. Setting Index 0 color to Magenta and Index# to black that is usually Index 0 is not an option, it changes the value of the colors, and thus image colors! Has to be arrange indexes
OR python without gimp. As a stand alone script.