Sounds cool, consider this some clamor for a live demo :-)

Thanks,
Jack

Scott Trudeau wrote:
[cross posted from the plugin list, which seems to have died in
February]

Hey folks,

I've been absent from the jquery lists for quite awhile, but just
recently had the opportunity to build a cool little plugin for a
project I'm working on so I decided to release it to the public.  This
plugin acts as an "eyedropper"-style color picker, allowing a user to
select a color by clicking a pixel in an image.

The plugin replaces selected img elements on the page with a canvas
element, and provides click, mousemove and mouseout event callbacks.
The callback is sent a color object (describing the color under the
mouse for the event). It also shows a little hovering preview of the
color near the cursor when over the image.

You can find it on github with a simple demo included:

http://github.com/sstrudeau/jquery-dropper

I'm hoping to receive some feedback on things like:

* callback function naming conventions
* which other arguments would be useful & appropriate to send via the
callback
* should I instead (or also) trigger events instead/as well as offer
callbacks?
* any best practice examples for making something like the color hover
chip style-able, optional?
* any other feedback

No live demo yet -- but if I hear a clamor, I might find a place to
tuck one.

Notable limitations: doesn't work on IE (the VML canvas hack doesn't
offer pixel-level access to images) and images must be hosted from the
same domain as the origin page (canvas security limitation).

Thanks,

Scott



Reply via email to