New Script for perfect palette generation from RGB sprite

I tested and it looks like the colors are generated correctly in this case, but I understand that problems will appear when the image contains more than 256 colors (all colors are reduced to 5-bit RGB precision and 3-bit for alpha). Some information about the fix coming in v1.3. We’ll try to add a new “automatic heuristic” no choose the algorithm to generate the palette automatically (octree by default, the old 5-bit RGBA cube if alpha is needed).