Thanks a ton for the info! I only just realized that the colors I'm looking for are in the exact same palette, and being shifted around like that. With accurate screenshots (which I was able to get easily, thanks to your room numbers list) I was able to work out exactly which ranges are being moved. I now have a python script that can manipulate the palette slots appropriate based on a series of commands for each specific image. Rather than think about the order of operations, I simply operate on a copy of the palette and "paste" ramps into that, and then set the output image to use that. That was the final technical hurdle facing this project. Thanks again!