PDA

View Full Version : Tolerance



jhildy
08-18-2007, 01:00 PM
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;

The Element
08-18-2007, 01:07 PM
Nice job! I will use this in my next script for sure!