screen

screen.screen.pixel

Declaration
lua
screen.pixel(x, y)
Description
Get pixel color as R, G, B, A components (0-255 each). Alternative API with alpha channel.
Parameters
NameTypeRequiredDefaultDescription
xintegerRequired—X coordinate
yintegerRequired—Y coordinate
Return Values
TypeDescription
integerR
integerG
integerB
integerA
nilIf capture failed
Example
lua
local r, g, b, a = screen.pixel(100, 200)