This library implements a color picker input box that lets users choose colors from a predefined palette or enter custom color values.
Import directly in html file.
<!-- HTML -->
<link href="path/jQuery-color-picker/color-picker.css" rel="stylesheet">
<script src="path/jQuery-color-picker/color-picker.js"></script>
# Edit default style
vi path/jQuery-color-picker/color-picker.css
# Edit default setting
vi path/jQuery-color-picker/color-picker.js
<!-- HTML -->
<!-- Add data attribute "WKCP" to your input elements -->
<input type="text" name="color" data-picker="WKCP" />
<!-- JavaScript -->
// Initialize color picker for container
$('.container').WKCP_init();
// Or initialize individual elements
$('input[data-picker="WKCP"]').WKCP();
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.