screen.screen.find_colors
Declaration
lua
screen.find_colors(colorTable [, x1, y1, x2, y2 [, tolerance]])
Description
Find multi-point color pattern with offsets. First entry is anchor (dx=0,dy=0), rest are relative offsets.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
colorTable | table | Required | — | Array of {dx, dy, r, g, b} |
x1,y1,x2,y2 | integer | Optional | Full screen | Search region |
tolerance | integer | Optional | 0 |
Return Values
| Type | Description |
|---|---|
| integer | Anchor X |
| integer | Anchor Y |
| nil | Not found |
Example
lua
local x, y = screen.find_colors({{0,0,255,0,0},{10,0,0,255,0}})