Color Picker
A simple color picker control. Supports saving custom colors to the palette via cookies. To open the palette, click the color box at the right side of the input box.
Demo
Download
Color Picker is available under the terms of the GNU General Public License.
Source:
Global dependencies for all controls:
- Prototype - an excellent Javascript object library
- prototype-base-extensions.js - extensions to the Prototype library
Usage
Constructor:
var picker = new Control.ColorPicker(element, options);
Parameters:
- element - The CSS id of the <input> element
- options - an object with name/value pairs of additional options
Additional Options:
- colors - an array of 40 colors (in hex format) to display in the swatch grid
- addLabel - the text to display in the "add custom color" button, defaults to "Add"
- Other options currently undocumented
Example:
new Control.ColorPicker('my_colorpicker');