0

Hi all,
I was recently having a look at the pywin32 module and found a multitude of approaches on how to find the color of a pixel given its coordinates, but was wondering if there was a way to find the coordinate of a pixel given its particular color, either as an rgb tuple or hex vlaue.
any help is greatly appreciated

3
Contributors
4
Replies
18
Views
2 Years
Discussion Span
Last Post by Crazyscript77
0

What relation could there possibly exist between coordinates and RGB values?
Unless, you have another definition of coordinates than me.

0

What I meant is how would one generate a list of coordinates of pixels of a particular color. The end effect I'm trying to achieve is to have the program be able to find the location of a particular color on screen, and then clicking on it. The clicking etc I understand how to do, yet the only method I know of finding the location of a colour would be to take a screenshot of the pixel at (0,0), check if it's colour matches the one I have predetermined, and then iterate across and down the screen with a loop function or something, which is massively slow.
Thanks for your help:)

0

cheers for all the helps guys, got it working by using PIL, it now takes a screenshot and checks for pixels in a color range, saving the coordinates and then clicking on them later:) thanks again for your assisstance!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.