Would it be possible to set do something along the lines of make a function that is able to search for a certain color in an area, example:
ColorSearch(x,y,color,x1,y1,x2,y2);
Color obviously being the color you are looking for.
x and y being the variables to save the color coordinates too.
Visual explanation of x1 y1 etc:
x2 y2 ----|
| |
| |
| |
| |
------x1 y1
So basically they are the coordinates of the grid you want the function to search for the color in.
Would it be possible? If so then how?