Thanks for the informative post!
I'm still unsure how I'd specify the colors to change to. Let's say I had a sprite of a character who's hair is green. On the 256x1 texture, titled "palette_1," green is the 4th entry. When I change the character's palette to another 256x1 texture, titled "palette_2," which has blue as the 4th entry instead of green, would it look through all the pixels in the sprite and change them accordingly (Ex. any green to blue)?