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