I read a blog today and recorded it if it is useful.
Color selectors are required in many aspects of WEB projects, such as setting the background color and border color of an element. It is best to set the color palette to be easy to use according to our interaction design expectations, only the commonly used color blocks are displayed for the user to choose from. In addition, an input box is provided to allow the user to enter custom color values. The one I used before (eyecon. RO) the functions are complete and simple, but they do not meet the above requirements. Therefore, Google does not find the ready-made jquery color picker plug-in under N, which supports the following functions:
Easy to use, only display commonly used color blocks for users to choose from, and provide an input box for users to enter custom color values
So I wrote the icolor plug-in, in addition to supporting the above requirements, there are other features as follows:
1. The default color value is "safe color of common browsers ". It is equivalent to integrating the color picker of the last prototype below. For browser security color values, refer to the Wikipedia http://en.wikipedia.org/wiki/Web_colors
2. You can customize common color values. It is equivalent to integrating the 7th color selectors in the following image.
3. You can set whether to display the color input box and confirmation button as needed.
4. inline mode and popup mode.
5. It is lightweight and complies with XHTML and css2 standards. The size is only 5 kb. Style and behavior separation.
I. jquery. icolor plugin example
Official Address: http://plugins.jquery.com/project/icolor
Here, the http://vivasky.com/labs/icolor/index.html
JS here, http://vivasky.com/labs/icolor/js/jquery.icolor.min.js
2. Popular online color picker JS component 1, native JS
- DHTML color picker from Free-color-picker.com
2. jquery plugin
- Farbtastic color picker plug-in
- Color Picker by eyecon. ro
- Normal color picker by www.felecan.com
- Jquery color picker by syronex
3. mootools plug-in
Moo rainbow
4. Prototype plugin
- Color Picker by John Dyer
- Prototype color picker by Myles eftos
Transferred from:
Http://www.cnblogs.com/mamboer/archive/2010/09/17/jquery_icolor.html