Pixel Color Detector/Pixel Scan

Mclovin024

New member
Would it to be possible to add a pixel color detector to read the color of a specific pixel at an x and y coordinate and store the color into a value within variable.

Second which I could live without would be to scan a range of pixels(screen area) for a pixel color value and return an x and y coordinate of the first pixel that matches that value within a certain portion of screen.



Hopefully others will comment on this as it would open up so many possibilities for more advanced macros. Currently hard to program condition driving ui interactions without this.
 

FrameXX

Well-known member
Sounds interesting, but reading screen like an image with all colors is not so easy even with accessibility services. I think MacroDroid would always need to ask for permission to record screen and this permission pops up always if any app tryes to record screen and cannot be allowed permanently. Try any screen recorder app and you will see what I mean.
 

Dm114

Well-known member
Would it to be possible to add a pixel color detector to read the color of a specific pixel at an x and y coordinate and store the color into a value within variable.

Second which I could live without would be to scan a range of pixels(screen area) for a pixel color value and return an x and y coordinate of the first pixel that matches that value within a certain portion of screen.



Hopefully others will comment on this as it would open up so many possibilities for more advanced macros. Currently hard to program condition driving ui interactions without this.
In addition to @FrameXX answer, if it were possible in MD, it would be easy to achieve your second request (scanning a range of pixels) with a loop instead of a hypothetical internal function that very few users would use I think.
 

Mclovin024

New member
Just a thought but currently MD can take a screen snap shot. What if you where to leverage that ability to take a snapshot and then process the pixle scan off the snapshot itself generate the x y variables that way. once done processing the code delete the snapshot all behind the scenes?
 

420

Active member
Would it to be possible to add a pixel color detector to read the color of a specific pixel at an x and y coordinate and store the color into a value within variable.

Second which I could live without would be to scan a range of pixels(screen area) for a pixel color value and return an x and y coordinate of the first pixel that matches that value within a certain portion of screen.



Hopefully others will comment on this as it would open up so many possibilities for more advanced macros. Currently hard to program condition driving ui interactions without this.
I'm not sure but maybe "TouchTask" plugin can do what you are looking for? It seems to me like it can but i gave it a (very) quick try myself and i could not get it to work..
 

Attachments

  • Screenshot_20220108-214120.png
    Screenshot_20220108-214120.png
    105.8 KB · Views: 83

Mclovin024

New member
I was able to get this to work with the 1 limitation that was mentioned by @FrameXX

My device ask to start recording.

I simply got around this by using a ui interaction gesture to click the start now automatically and the pixel hex value from the x and y cords where stored to a local variable on MD.
 

Attachments

  • Toutch_color.macro
    3.4 KB · Views: 153
Last edited:

Cardguys3

New member
Paid user here. Perhaps there is a way we can request this feature. Being able to detect a single pixel color and then uses that value to 'run things' would be IDEAL.
 
Top