Ron
2006-10-28 21:12:26
Color/Tolerance Matcher! - Get exact tolerance needed to find a certain color!
by Ron
by Ron
I made this small program to get the right colors I needed to make scripts for a different game, and it worked very well! Program is attached. Instructions are in the script, and they say to fill out the const. :P
Here is an example I got when I tried to match 3 colors (16114904,16579057,16711163) with the color 16777215.
/—– Matching colors with 16777215 —–\
16114904 matched at tol: 49
16579057 matched at tol: 16
16711163 matched at tol: 5
Thanks for using the ColorToleranceMatcher by Ron
Successfully executed
So with this information I could make a function more efficient by looking for the exact tolerance needed to find the color range I'm looking for.
program New;
var
x, y, x2, y2 : Integer;
begin
GetClientDimensions(x2, y2);
// Here I'm looking for a color, with a tolerance of 49, so I can find all
// the numbers within the same tolerance up to the color: 16114904
if(FindColorTolerance(x, y, 16777215, 0, 0, x2, y2, 49))then
begin
WriteLn('Color found at coords ('+IntToStr(x)+', '+IntToStr(y)+')');
end;
end.
I hope I helped a little. :D
~Ron