screen

screen.screen.find_all_color

Declaration
lua
screen.find_all_color(r, g, b [, x1, y1, x2, y2 [, tolerance [, limit]]])
Description
Find ALL pixels matching RGB color. Returns array of coordinates.
Parameters
NameTypeRequiredDefaultDescription
rintegerRequired—Red
gintegerRequired—Green
bintegerRequired—Blue
x1,y1,x2,y2integerOptionalFull screenRegion
toleranceintegerOptional0
limitintegerOptional100Max results (min 1)
Return Values
TypeDescription
tableArray of {x, y} tables (always returns table, may be empty)
Example
lua
local pts = screen.find_all_color(255, 0, 0, 0, 0, 750, 1334, 10, 50)