need to swap color into image like if image has red,blue,green color and if I change red to pink so how I change change in javascript