I don't want to kind of push Previous out of the way or anything, but I have had a go at this using ActionScript 3.0 in an Adobe AIR application and it's working OK. What I've done is grabbed 3 sprites, A, B and C from the sprite sheet. A and B are identical, but with different palettes, and C is a whole different frame with the same palette as A. What I can do is change C's palette to that of B by comparing the colours of A and B.
The problem is that this took about 8 seconds, which seems a bit long. If I were to do the entire sprite sheet it'd take ages. I think the problem is that I have to go through every single pixel in the sheet and replace it (unless it's the background colour, which is defined in the program). Unfortunately I don't know of any other way to do it, though.
But then again I don't know if AS3 is fit for stuff like this. Maybe whichever language Previous is using has a more efficient method.
EDIT: Discovered a CPU-wasting flaw in my code and found a workaround. The time it takes to change the palette of C is now just 1 second. Not instantaneous just yet, but it's much faster than before.
The problem is that this took about 8 seconds, which seems a bit long. If I were to do the entire sprite sheet it'd take ages. I think the problem is that I have to go through every single pixel in the sheet and replace it (unless it's the background colour, which is defined in the program). Unfortunately I don't know of any other way to do it, though.
But then again I don't know if AS3 is fit for stuff like this. Maybe whichever language Previous is using has a more efficient method.
EDIT: Discovered a CPU-wasting flaw in my code and found a workaround. The time it takes to change the palette of C is now just 1 second. Not instantaneous just yet, but it's much faster than before.