Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pixel color by screen position 1

Status
Not open for further replies.

newu

Technical User
Oct 11, 2006
2
US
Using terminal on MAC, any idea on how to get pixel color at specific location (e.g., {100,100}) on screen?
 
You may have to use a third-party screen capture utility (import from ImageMagick?) and interpret the resulting file. Or /usr/bin/screencapture if it's available on your system.

I considered xwininfo and xdpyinfo but neither give that kind of information or allow you to specify an individual pixel.

Obviously capturing several million pixels to look at one of them is an expensive way to do it; maybe one of those capture utilities would allow you to focus the captured area more accurately.

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
Hi

Regarding Annihilannic's ImageMagick suggestion :
Code:
import -window root -crop 1x1+100+100 xpm:- | grep -o '#[[:xdigit:]]\+'
For me it outputs #EBEBF0F0FFFF, that is the background color of the Tek-Tips Threadminder list, displayed at pixel 100:100 of the screen.


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top