This is a jQuery plugin intended to be an imprecise color picker. Colorstrip currently requires a browser that supports the canvas element.
Put a div (or canvas element) somewhere on your page. It can be any width and height, colorstrip will automatically scale itself to fit the element's width and height.
<div id="color"></div>
Include jQuery and the colorstrip plugin on your page. Create the colorstrip in a script block.
$('#color').colorstrip(function(hex) {
//Handle the color change event somehow...
});
The colorstrip can also display a preview of the current color as it changes:
$('#color').colorstrip({
preview: 'right',
change: function(hex) {
//Handle the color change event somehow...
}
});
Currently only right
is supported for the preview option.