I am trying to obtain the color of pixels located inside a rectangle found using the “get position” activity. To do this, I plan to extract the coordinates of the rectangle and use those coordinates in conjunction with the “colorcode” activity that I found here: ColorDetectorActivities,
The problem I’m having is that I can’t figure out how to get the pixel coordinates of the rectangle. Is there an activity that will get me this information?
Output of Get Position Activity will be the rectangle coordinates which you can input into ColorDetectorActivity as given below:
X = rectangle.X Y = rectangle.Y
Also, you can set highlight flag in ColorDetectorActivity as True to hightlight the input pixel location on the screen. This will help you to identify correct pixel location. Use it only for testing purpose.