Submit your widget

jQuery sweet color swatch plugin

Created 10 years ago   Views 6570   downloads 1713    Author maxmackie.
jQuery sweet color swatch plugin
View DemoDownload
Share |

This is a jQuery plugin that turns a single div into a sweet color swatch (aka, color pallette).

Simply place a similar div element where ever you want a swatch to appear:

<div class="swatch" data-name="Buried at the Beach" data-colors="#886655,#DD9977,#EECCAA,#EEEEEE,#CC99CC"></div>

Then, after including jquery.swatches.js, call the swatchify() function on the div:


And when you load your page, you'll have this lovely thing staring at you (the right is what it looks like when you hover over the swatch):

Read more: