Bookmarklet request.

Anyone know if it would be possible to create a bookmarklet that emulates an EyeDropper style application: as you move it around the page it shows you the hex colour code for the pixel directly under the mouse pointer? I’m pretty sure it can’t be done but I’d love to be proved wrong.

[Simon Willison's Weblog]

I’m thinking that the document.onmousemove would have to be set to a function handler that interrogated the event object to determine the underlying target. Once the target was acquired, a simple query on the background color and a message to the statusbar and voila! There you have it.

Of course, this does not directly answer the question. What’s missing here is the code. I’ve pieced together a bookmarklet that inserts a div and/or form into the current document and allows drag and drop capability. I imagine there would be some similarities however.

Oh, and by the way, I’m only making these assumptions on an IE platform. I can’t and won’t make guarantees for other browsers.

Update:
After more thought, I agree with Simon on his assessment of the possibility of an EyeDropper style application. That is, I agree that a pixel-based bookmarklet is not doable–only a page element-based bookmarklet. That would exclude any images used in the page, so such a bookmarklet would be of limited use.