Is there a way to take an image with a white background, and with css, take every pixel of white and change it's opacity to 0? 

Basically, I want to take an image with a white background and get rid of the background, so it looks like a properly cropped image. (Does that make sense?)

Extra credit: Is there a way to declare a tolerance? So, any color that is less than x number of variables away? So, if rgb(150, 150, 150) was targeted, could we somehow capture all colors that are only a total of 30 values different, like rgb(140, 160, 160)?