slayeroffice - web experiments gone horribly awry

04.19.2004 - Color Picker ActiveX Experiment

Simon Willison posted on his site yesterday a request for a bookmarklet that would allow you to see the hex color value of the pixel beneath the mouse cursor.

I had given some consideration to this same idea a few months ago but abandoned the project because of the requirements of the code:

  • A Win32 OS
  • MSIE5+
  • ActiveX

I generally try to stay away from ActiveX as a rule, but that's really the easiest way to accomplish this particular task. I suspect Java could do it as well - but it would have to be signed to even work, unlike activeX which can be coerced into working by lowering your security settings. I have no desire to drop the cash required to get a cert for either.

I thought I would post the results of my experiment in the off chance that someone might benefit from my very sloppy, purely experimental code. Give it a look here.. Requirements as stated above - you'll also need to set slayeroffice as a "Trusted Site" in MSIE's security settings and set the appropriate settings to enable activeX components for it to work.

Wouldn't it make more sense to do this at the GUI level so you're not restricted to what you've got in a Browser? For example, on the Mac you could use XScope: http://www.iconfactory.com/xs_home.asp I assume there's equivalent tools for Windows.
Posted by Peter da Silva on April 20, 2004 @ 4:11 pm
It absolutely makes more sense to do it that way, and I in no way advocate the use of this nor do I recommend using ActiveX to do anything at all - it's just an experiment and I only posted it after seeing the post on Simon's site about it. As far as something like this existing for windows - sure, lots of them. I even wrote one myself about five years ago - see the Color Sampler in the Navigation column to the right under "Standalone Win32 Tools", where a good chunk of the code for the ActiveX part of this came from.
Posted by Steve on April 20, 2004 @ 4:19 pm

Comments have been closed for this post.