Its rather complicated, but you could, in theory, use the Canvas plug as a mask.
You would have to do a nested loop to compare rgb values, like if rgbaAt loopx,loopy = 255,0,0, canvas draw point at loopx,loopy, color 0,255,0.
Of course you would have to repeat the loop for each additional color you want to change.