function CompareRGB(master, current: TColor32; tolerance: Integer): Boolean;

A callback function that can be passed as a parameter to various functions. This function compares two colors and returns true when 'current' is within 'tolerance' of 'master' for each of its 3 color channels. (While the alpha channel of 'master' is ignored, if the alpha channel of 'current' is less than $80, then the function will return false.)