Lua:getPixel
Jump to navigation
Jump to search
Returns the RGB value of the pixel at the specified screen coordinate.
Function Parameters
| Parameter | Type | Description |
|---|---|---|
| x | Integer | The X coordinate of the screen pixel. |
| y | Integer | The Y coordinate of the screen pixel. |
Returns
integer — The RGB value of the pixel at the specified screen coordinate.
Examples
1 local color = getPixel(100, 100)
2 print(string.format("Pixel color: #%X", color))