Get pixel color

938 views
Skip to first unread message

FeoniX4YoonA

unread,
Jul 20, 2016, 6:31:17 AM7/20/16
to Automate
How can I get a pixel color on screen using adb? I wish to get it directly not through screen capture, thanks!

FeoniX4YoonA

unread,
Jul 20, 2016, 6:35:32 AM7/20/16
to Automate
I have tried the following:
screencap /sdcard/scr.dump;let offset=720*500+500+3;dd if='/sdcard/scr.dump' bs=4 count=1 skip=$offset 2>/sdcard/result.txt | hexdump

But get the following result:
stdout: write error: Broken pipe
1+0 records in
0+0 records out
0 bytes transferred in 0.095 secs (0 bytes/sec)

Message has been deleted

FeoniX4YoonA

unread,
Jul 22, 2016, 10:03:19 PM7/22/16
to Automate
Any one knows how? I see this is one of the important Automate features...

Henrik "The Developer" Lindqvist

unread,
Jul 22, 2016, 10:42:36 PM7/22/16
to Automate
Why would you need to read the color of a pixel?
Use the Interact block to inspect the on-screen content.

FeoniX4YoonA

unread,
Jul 23, 2016, 6:53:29 AM7/23/16
to Automate
Because some buttons when being clicked, they change color, hence I need to detect the color change to change actions. Hope you can teach me how to do that thankyou!

endar...@gmail.com

unread,
Aug 17, 2018, 10:18:21 AM8/17/18
to Automate
A pixel color block built up like the interact touch block including an option for not perfectly exact colors ti match would be really nice. Is color block.

​ ​man

unread,
Jul 23, 2024, 7:23:57 AM7/23/24
to Automate for Android
Been looking for that, too. Happily, there's a block for it now :)
Reply all
Reply to author
Forward
0 new messages