Remap Sprite Colors

Converting sprites to palettes is a bit challenging but the Color Tool can automatically attempt to do this for you when changing between color modes. For example, if you change a project from direct color mode to palette mode, the Color Tool is going to make the necessary changes to the color.png and sprites.png. You’ll get the following warning before any changes take place.

image alt text

While in palette mode, the Color Tool will split the color memory in half. It will reserve the first 128 colors for unique system colors and the other 128 colors will be split up into 8 palettes of 16 colors each. The sprite colors will also be remapped to the first palette.

image alt text

When you convert sprites to work in palette mode, the sprite colors are parsed and up to 16 colors will be placed in the first palette. This will overwrite the default CPS limitation in the Sprite Chip to give you a chance to manually fix the colors in the palette. You can see the changes in the updated colors.png file by opening it in an external image editor.

image alt text

As you can see, the last 128 colors are now reserved for the palettes. The first palette uses the colors found in the sprites.png file and the background color is used to fill the colors for the remaining palettes. The tool will also create a new color-map.png file. Inside will be 16 grayscale colors used to map the colors back to the first palette.

image alt text

In addition to adding a color-map.png file, the sprites.png file will be recolored to match up to it. Here is an example of the new sprites.png file after switching to palette mode.

image alt text

The remaining palettes will all be filled in by the first system color.

image alt text

It’s up to you to recolor the sprites, limit the size of the palettes, and make sure any existing sprites map over to the new palette colors correctly.

Finally, you can switch back to direct color mode and the Color Tool will attempt to build the color.png and sprite.png file accordingly. It will re-map all of the sprites back to the first palette, remove the palette colors from the color.png file, and delete the color-map.png file. Try to avoid switching between modes as sprite colors may get shifted or corrupted. While this tool is here to help, it’s usually best to choose the color mode you want to work in before creating artwork.