So, I've been experimenting ways to come up with palette swapping for games like Mega Man. The only way to do it correctly without color loss is to use layered masks. This example shows you the differences of color swapping a single game sprite vs. using masks for the same effect.
Pressing the numbers on the keyboard will give you different Mega Buster charge frames.
Press the Enter key for the Rush Coil/Jet palette
Pressing Space Bar will give you the ink effect from Mega Man 9.
The option is set to layered masking by default. Using the single sprite option, you will see that the colors will eventually get lost in transitions.
We do NOT want this behavior. So the only logical conclusion is to use layers to achieve the best effect possible.
Download color tests example below: