Indexed Color / Colormapping support

Something my friend was disappointed to see missing from PixiEditor was support for using Indexed Colors, specifically being able to import and export png files using the indexed color format, but I believe that more general support for color mapping/Indexing would be practical.

To be clear, although PixiEditor dose have a Palette and Swatches feature, it appears these are mainly to serve as a convenient way to select a color from a list, not as a means to map specific colors to specific indexes, or a way to map specific pixels to specific color indexes.

This is a feature that my friend makes use of all the time in GIMP, it prevents you from adding too many colors to a sprite that is intended to fit a limited color pallet, can be used to easily swap between different color pallets on the fly, and by exporting as a Palette-based png, (ie 8bit / 4bit pixel depth instead of 24bit RGB pixel depth) allows for less memory usage in video-game development, and better compatibility with projects targeting retro platforms / art styles.

To help clarify, for example, using the current Palette tool, if you try to add two different indexes / palettes with the same color. PixiEditor treats both as if they had the same index.

This is in contrast to GIMP’s Colormap tool.

It’s possible there might be good reasons why this is not a feature of PixiEditor, I understand that the Graph / Node tools are built around treating colors as 3part vectors, so introducing indexed colors / Colormapping could cause some complications with that system, and may even require introducing new Nodes and or sockets to convert between the color modes. (Something similar to the UV Sample Image node)

Which brings me to my last point, I believe that adding support for Indexed Colors / Color Mapping would serve as a practical building block for more complex features to build off in the future. I have seen other feature Request that would appear to be easier to implement given the ability to map specific pixels of an image to specific color indexes, rather then a specific color.

Apologies for the wall of text, hopefully my explanation wasn’t too difficult to follow. TBH even just adding an option to export a PNG in a palette image format instead of in a RGB format would be very useful!
Regardless I really like the UX design of PixiEditor, and plan to use this as my main Image editing software from now on! :smiley: