Function Reference


PixelGetColor

Returns a pixel color according to x,y pixel coordinates.

PixelGetColor ( x , y [, hwnd] )

Parameters

x x coordinate of pixel.
y y coordinate of pixel.
hwnd [optional] Window handle to be used. Default is the desktop window.

Return Value

Success: a decimal value of pixel's color.
Failure: -1 if invalid coordinates.

Related

MouseGetPos, PixelChecksum, PixelCoordMode (Option), PixelSearch

Example

#include <MsgBoxConstants.au3>

Local $iColor = PixelGetColor(10, 100)

MsgBox($MB_SYSTEMMODAL, "", "The decimal color is: " & $iColor)
MsgBox($MB_SYSTEMMODAL, "", "The hex color is: " & Hex($iColor, 6))