First of all, I don't need help with the actual programming. Only the theory.
I'm working on a program that are converting a 256 colour picture with a certain palette into a new picture (also 256 colours) with another palette. Since there are different palettes, the colours will be screwed up if you just copy the data.
Therefore, the program must find the colour (in the new palette) that matches the old colour the best.
To do this, I use the Red, Green and Blue values in the colour as the three axises in a 3D coordinate system. And to find the colour that is the best match, I simply pick the colour that is closest to this point in the coordinate system (using Pythagoras).
What do you think? Is this the right way to do this?
Or is the closest colour not neccesarily the colour that looks most alike?