Lua:getPixel

From Cheat Engine
Revision as of 03:54, 21 June 2026 by Leunsel (talk | contribs)
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

local color = getPixel(100, 100)
print(string.format("Pixel color: #%X", color))

Main Pages

Core Lua documentation entry points

Lua
Script Engine