Lua:getPixel

From Cheat Engine
Revision as of 20:29, 25 June 2026 by Leunsel (talk | contribs) (Syntax Highlighting.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<> Lua API Reference

function getPixel(x, y) : integer

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))

Main Pages

Core Lua documentation entry points

Lua
Script Engine