jhildy
2007-08-18 09:00:23
this works by using similar colors but it finds how much tolerance is between each color.
Function Tolerance(color1,color2: integer): integer;
var i: integer;
begin
For i:=0 to 255 do
begin
if similarcolors(color1,color2,i) then
break;
end;
writeln('Tolerance should be '+inttostr(i));
result:=i;
end;