Gimp-Forum.net
Pixel Art Palette Swap Plugin Release - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: Pixel Art Palette Swap Plugin Release (/Thread-Pixel-Art-Palette-Swap-Plugin-Release)



Pixel Art Palette Swap Plugin Release - thetalkietoaster - 03-16-2023

Just thought I'd post this here - I'm not sure where to put plugins with the repository gone but this is somewhere.

Just made a Python script plug-in that does palette swaps for pixel art that's RGB* and not indexed. Available on GitHub here.
It recolours the current layer, in one of two modes:
  1. If given another layer, it identifies the unique colours in both it and the current layer, sorts each of them in order of RGB value, then maps them across.
    [attachment=9538][attachment=9539]
  2. If given 2 1-pixel-high layers, it builds a map out of them, and recolours everything in the current layer the colour of pixel 1 of the 'subset' layer the colour of pixel 1 of the 'sample' layer. Then continues through.
    [attachment=9542][attachment=9541]
It could be more efficient on large images, and I've got a thread open on that.

Since I couldn't find anything like this when I searched here, hopefully other people will find this in the future.