sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #35727
Re: [Question #275295]: Finder returns matches no matter the color of the image
Question #275295 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/275295
Status: Open => Answered
RaiMan proposed the following answer:
please read:
http://sikulix-2014.readthedocs.org/en/latest/basicinfo.html#sikulix-how-does-it-find-images-on-the-screen
about color evaluation:
# get the color of a point on screen
c = Location(100,100).getColor()
# string representation of color (Java class java.awt.Color)
print c
# value 0...255 for each RGB component
print c.getRed()
print c.getGreen()
print c.getBlue()
# compound RGB value with transparency in 4 byte integer
print c.getRGB()
# array of 3 floats 0...1
cf = list(c.getRGBColorComponents(None))
print cf
... prints in my case:
java.awt.Color[r=231,g=231,b=231]
231
231
231
-1579033
[0.9058823585510254, 0.9058823585510254, 0.9058823585510254]
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.