Js color selection plug-in and js color plug-in
COLPICK is a very light and small jquery plug-in that can implement color selector without pictures. It only uses JS and CSS to implement all functions and is very intuitive, similar to the Photoshop interface, easy to use. The color and shade are easily customized. html5 + CSS3 is used to achieve the appearance, and the plug-in is only 28 KB. the browser loading speed can be said to be very fast, in versions earlier than IE9, you only need to load html5shiv. js.
Download this plug-in and colpick. js and colpick.css to add it to the header of your document:
<script src="js/colpick.js" type="text/javascript"></script><link rel="stylesheet" href="css/colpick.css" type="text/css"/>
Html
<button id="picker">Show Color Picker</button>
Js
$ ('# ColorSelector '). colpick ({flat: true, layout: 'full', submit: true, width: 500, colorScheme: 'dark', color: "# bbbbbb", onChange: function (hsb, hex, rgb, el, bySetColor) {}, onSubmit: function (hsb, hex, rgb, el) {// process your business needs }}). keyup (function () {$ (this ). colpickSetColor (this. value );}). colpickSetColor ("passing in a default color ");
The above is all the content of this article. I hope this article will help you in your study or work. I also hope to provide more support to the customer's home!