Simba Code:
//Box search area
function SimbaOpColorFinding(Color: Integer; SearchArea: TBox): TPointArray;
begin
FindColors(Result, Color, SearchArea.X1,SearchArea.Y1,SearchArea.X2,SearchArea.Y2);
end;
//Points search area
function SimbaOpColorFinding(Color: Integer; SearchArea: TPointArray): TPointArray;
var
SearchBox: TBox;
begin
SearchBox := GetTPABounds(SearchArea);
FindColors(Result, Color, SearchBox.X1,SearchBox.Y1,SearchBox.X2,SearchBox.Y2);
end;
If you're using an include you might want to make use of functions already built in to it. If you need this for OSRS then use AeroLib. Here's a great guide that'll get you started with the basics, including color finding.