title: PIL Best Way To Replace Color?
body: <p>I am trying to remove a certain color from my image however it's not working as well as I'd hoped. I tried to do the same thing as seen here <a href="https://stackoverflow.com/questions/765736/using-pil-to-make-all-white-pixels-transparent">Using PIL to make all white pixels transparent?</a> however the image quality is a bit lossy so it leaves a little ghost of odd colored pixels around where what was removed. I tried doing something like change pixel if all three values are below 100 but because the image was poor quality the surrounding pixels weren't even black.</p>
  
  <p>Does anyone know of a better way with PIL in Python to replace a color and anything surrounding it? This is probably the only sure fire way I can think of to remove the objects completely however I can't think of a way to do this.</p>
  
  <p>The picture has a white background and text that is black. Let's just say I want to remove the text entirely from the image without leaving any artifacts behind.</p>
  
  <p>Would really appreciate someone's help! Thanks </p>