f8, finding color range with a single pixel

Hi guys,

Wondering if anyone knows how to do this. Say i use getPixel on a bitmap and got the color info for it. Is it possible to define a range for that color i got. I need that as i find it almost impossible to define and work with just a single pixel color from a bitmap image as every single pixel has a different color and i cant go defining pixel by pixel or calculate pixel by pixel. There has to be a better way of doing this.

Many thanks in advance.