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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
x | integer | Required | — | X coordinate |
y | integer | Required | — | Y coordinate |
Return Values
| Type | Description |
|---|---|
| integer | R |
| integer | G |
| integer | B |
| integer | A |
| nil | If capture failed |
Example
lua
local r, g, b, a = screen.pixel(100, 200)