screen

screen.screen.find_color_rgb

Declaration
lua
screen.find_color_rgb(r, g, b [, x1, y1, x2, y2 [, tolerance]])
Description
Find first pixel matching RGB color in region. NEON SIMD accelerated row scanning.
Parameters
NameTypeRequiredDefaultDescription
rintegerRequired—Red 0-255
gintegerRequired—Green 0-255
bintegerRequired—Blue 0-255
x1,y1,x2,y2integerOptionalFull screenSearch region
toleranceintegerOptional0Per-channel tolerance
Return Values
TypeDescription
integerFound X
integerFound Y
nilNot found
Example
lua
local x, y = screen.find_color_rgb(255, 0, 0)
local x2, y2 = screen.find_color_rgb(255, 0, 0, 0, 0, 375, 667, 10)