The most efficient thing I can think of: Take a sample of the picture behind the sprite, only looking at pixels that are covered (beneath opaque, not transparent pixels). Iterate through those pixels. If you find a pixel whose color value is equal to the one you're checking for, stop searching and return true. If you reach the end of the sample without finding a match, return false. As long as your images aren't huge, it shouldn't eat up too much overhead.
Offline