Very simple algorithm, it checks every pixel's RGB value if it is within range of the set value + tolerance. If this is true, it sets the pixel to be fully transparent. There is no check for partial matching / partial transparency.