screen

screen.screen.find_color

Declaration
lua
screen.find_color(colors [, similarity, left, top, right, bottom])
Description
Find position matching color pattern on screen.
Parameters
`colors` (table) — color pattern with offsets `similarity` (number) — match threshold 1-100 `left,top,right,bottom` (number, optional) — search region
Return Values
`number` x, `number` y — found position, or nil
Example
lua
local x, y = screen.find_color({
  {0, 0, 0xFF0000},
  {10, 0, 0x00FF00}
}, 90, 0, 0, 750, 1334)