(ACA= Auto Color Aid)
Simple ACA code for Varrock road color:
Function VRC: TPoint;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(16.49, 0.84);
FindColorsSpiralTolerance(MMCX, MMCY, arP, 9013892, MMX1, MMY1, MMX2, MMY2, 3);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
If CountColor(Arc[i],MMX1,MMY1,MMX2,MMY2) > 100 Then
Begin
Result.x := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i])+'px:'+IntToStr(CountColor(Arc[i],MMX1,MMY1,MMX2,MMY2)));
Result.y:=CountColor(Arc[i],MMX1,MMY1,MMX2,MMY2);
Break;
End Else
Continue;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
List of multiple Varrock road colors to be used with ACA
8620683
8752269
8489097
8291717
8160131
8357511
8818318
8949648
8816777
8422019
8947853
8555145
8094342
8686479
9013897
8947848
8487296
9145489
8947337
9013386
9013388
8684424
8750216
8421251
8552837
8684422
8618888
8684682
8816268
8947854
8355717