   Simple Image Processing idea
  I have an image(texture) with white background, and  red,green,blue and yellow colored text over it. Now I need to eliminate text written in yellow and green , when I click the button.I tried implementing with thresolding and filtering, but met with little success.  Any ideas.   
  I don't think you will be able to remove the overlapping areas very easily, since you don't know if they were originally a given color, or if they combined with something underneath it to make its current color (assuming you allow some transparency).But you should be able to detect a given color by making a per-channel comparison of what you are looking for.  Take the magnitude of the difference between the color you are looking for and each pixel's color.  Then if all of the magnitudes are zero, then you have a color match (make sure you take the abs(x) to check the magnitude).  Then you can set it to the background color, and you won't change any values that partially match the colors.   