jQuery颜色选择器插件jColor.js -JS/jQuery代码 -演示与下载 -时代Java

- a jQuery color picker

Zero configuration!

The color picker automatically picks up the CSS color of the element it is attached to, if no color is given as a configuration parameter.

HSL(A) colors

The default color space is HSLA (hue, saturation, lightness, alpha). The default color can be given, either as a hexadecimal string, or as an object containing the color component values.

RGB(A) colors and static sliders

The common RGBA (red, green, blue, alpha) space is of course also supported.

Some people prefer that the slider backgrounds does not dynamically update based on the current color. This option is also available for the HLS(A) color space, but it is not recommended from a usability standpoint.

Customizable UI

Per default, jColor sports a minimalistic UI, but it can easily be augmented with labels and textual color output.

Output formats and color change events

The currently selected color can be output in various formats, and it is always possible to specify color space. Whenever the user picks a new color, a 'newcolor' jQuery event is triggered. This makes it super easy to update other page elements, based on the user selected color! The current color can also be accessed by calling any of the following.
	  
$('.your-colorpicker').colorpicker().toString();
$('.your-colorpicker').colorpicker().toCssString();
$('.your-colorpicker').colorpicker().toObject();
	  
	

Themability

With just a few lines of CSS, the entire appearance of the color picker can be altered. Internally, all sizes are set in the 'em' unit.

Customized expand/collapse events

The expanding and collapsing of the color picker can be customized by providing jQuery event strings. Note that it is possible to pass several events in the same string!

Cleanup

Creating and destroying a color picker works in the same way as most jQuery plugins.
[placeholder]

下载代码说明
X关闭

jQuery实现的颜色选择器插件jColor.js源码

这是一款基于jQuery实现的颜色选择器插件jColor.js,是一款支持自由调整颜色的jQuery插件。有多重颜色与样式供使用者进行选择,非常具有实用价值。是一款非常实用的插件源码。该源码兼容目前最新的各类主流浏览器。