And of course - it doesn't take a genius to put black text on top of a black gif - no filter is going to be able to do that. This is just a tremendous waste of time to appease those that think invisible text is important to begin with.
Text on top of an image is easy. You just render the page and compare the color of the text bits as they are placed in relation to the background that they are placed on.
This is the same way that you look at text with CSS inside tables inside divs ......
Putting checks on a rendering engine is a lot of work, but it would be the most accurate way to do this.