Comparing RGB Colours
Asked by
Dave Marsden
I'm trying to compare some pixels to a set colour to find the extents of some selected text. I'm using the code.
PixColour = MyRobot.
pColour = PixColour.getRGB()
print PixColour, hex(pColour), hex(colour)
if pColour == colour:
print c
Which is printing out
java.awt.
By my reckoning the RGB values should give a hex value of 0x316ac5 however they aren't they are give -0xce953b and hence my detection of the colour is failing.
Can anyone explain to me where I'm going wrong
Thanks
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Dave Marsden for more information if necessary.
To post a message you must log in.