Better color replacement methods

Hi! Would it be possible to make the color replace effect perform better? It’s fine on pc but I tested my game on mobile and if there’s more objects the fps drops significantly. I don’t want nothing crazy just a nice way to use this effect for things like palette replacement for pixel art.
Cause right now if I want to replace 3 shades of a color I need to use 3 effects which is kinda heavy I think.

I’ve also tested the recolorizer extension but it seems to freeze my game for a short period of time and it lags my game too.

So I think new color replacement methods would make life easier for a me and a lot of other pixel art devs.