Old code never dies. I posted this on the forum years ago. For those that test objects that do not have the color properties there is a way to check an individual pixel of any object on the desktop. The code is VBscript. You can format the output to suit your needs.
Function Return_RGB(objWindowType, nvXcoord, nvYcoord)
'*************************************************************************************************************************
'* FUNCTION: Return_RGB(objWindowType As Object, nvXcoord As Long, nvYcoord As Long)
'*
'* PURPOSE: To return a RGB set of values that is the color of the X, Y coordinate of the Window Object
'*
'* EXAMPLE: Return_RGB(Sys.Process("MyProcess").VCLObject("frmMain"), 10, 10) ' Normal Window object
'*
'* The example returns the RGB color of the pixel at the 10,10 coordinate of the VCLObject("frmMain").
'* The return value is a string that would look like >>> 255,26,0
'* The '255' is the Red value. 1st position
'* The '26' is the Green value. 2nd position
'* The '0' is the Blue value. 3rd position
'*
'*************************************************************************************************************************
Dim tPOS, dcWindow, nvRGB, svTemp
Dim lRed, lGreen, lBlue
Set tPOS = POINTAPI
Return_RGB = "NO COLOR FOUND"
If objWindowType.Exists = True Then
' Move to the X, Y coordinate
objWindowType.HoverMouse nvXcoord, nvYcoord
' Get the dc of a specific hwnd - the desktop
dcWindow = Win32API.GetWindowDC(0)
' Get the cursor position relative to the screen.
tPOS.y = objWindowType.ScreenTop + nvYcoord
tPOS.x = objWindowType.ScreenLeft + nvXcoord
' Use GetPixel() with the appropriate DC and location
nvRGB = Win32API.GetPixel(dcWindow, tPOS.x, tPOS.y)
' HEX to string
svTemp = Right("000000" & Hex(nvRGB), 6)
' Parse out the individual values
lRed = CLng("&H" & Right(svTemp, 2))
lGreen = CLng("&H" & Mid(svTemp, 3, 2))
lBlue = CLng("&H" & Left(svTemp, 2))
Return_RGB = CStr(lRed) & "," & CStr(lGreen) & "," & CStr(lBlue) 'Return the RGB values here
Else
Return_RGB = "NO COLOR FOUND"
Log.Warning "Return_RGB - NO COLOR FOUND - Object did not exist - Window to check= " & objWindowType.Name, "", pmNormal, LogAttributes(0), Sys.Desktop
End If
End Function