Returns a pixel color according to x,y pixel coordinates.
PixelGetColor x , y
Parameters
x | x coordinate of pixel. |
y | y coordinate of pixel. |
Return Value
Success: | Returns decimal value of pixel's color. |
Failure: | Returns -1 if invalid coordinates. |
Remarks
Earlier versions of AutoIt (prior to v3.0.102) used the BGR format for defining color - newer versions use RGB by default but this can be changed using the ColorMode option.
Related
ColorMode (Option), PixelSearch, PixelCoordMode (Option), MouseGetPos
Example
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
var = oAutoIt.PixelGetColor( 10 , 100 )
WScript.Echo "The color is" & var