What is jscolor?

jscolor is a JavaScript component extending standard form controls of a smooth color picker dialog. All you need to pickerize your text fields (like below one) is to include script jscolor.js into your HTML page and turn all related <input> elements into <input class="color">

Try It!

News

  • 2009-04-13 jscolor-1.2.3 released. This version fixes incorrect computing of the dialog width.
  • 2009-02-03 jscolor-1.2.2 fixes image preloading again, it should be finally working now. Thanks to Jan Nicklas for bug report.
  • 2009-01-16 jscolor-1.2.1 release fixes incorrect image preloading. Also, property bindAuto has been renamed to binding.
  • 2009-01-16 I'm proud to announce jscolor-1.2.0! Changelog:
    • new default settings: color=FFFFFF, hash=false
    • property picker renamed to pickerOnfocus
    • added support for image preloading
    • jscolor is now released under the GNU LGPL
  • 2008-11-30 jscolor-1.1.2 released! Methods fromHSV() and fromRGB() now truncate input values. Functions showPicker() and hidePicker() became public, so you can show/hide the picker manually.
  • 2008-11-23 jscolor-1.1.1 released! This version fixes HEAD bug and introduces new property pickerPosition. There are also some new examples on this site.
  • 2008-10-26 I'm proud to announce new, completely rewritten jscolor-1.1.0. Color picker is now much more customizable and widely accessible via API. Enjoy!

Author & License

GNU LGPL jscolor project is maintained by Honza Odvarko and released under the GNU Lesser General Public License. LGPL differs from GPL by allowing you to use jscolor even in non-(L)GPL applications. You can repay my work e.g. reporting the bugs you have found or telling me what to improve :-)

Cross-browser compatibility (for release 1.1.2)

Ace ExplorerWinsupported
Avant Browser 11.5Winsupported
Firefox 2Winsupported
Firefox 2Linuxsupported
Firefox 3.0.3Winsupported
Flock 1.2.1Winsupported
Google Chrome BetaWinsupported
Internet Explorer 5.01 SP2Winsupported
Internet Explorer 5.5 SP2Winsupported
Internet Explorer 6Winsupported
Internet Explorer 7Winsupported
Konqueror 3.5.4Linuxsupported
Netscape 8.1Winsupported
Opera 9.01Winsupported
Safari 3.0.4Winpartially supported
Safari 3.1.2Winsupported
SeaMonkey 1.0.5Linuxsupported

If you are using browser not mentioned here or you noticed different support status, it would be really helpful to test jscolor in your environment and write me how it behaves there. Need to know your OS, browser name and browser version.

Download

Latest release is jscolor-1.2.3.zip

Installation

  1. include script jscolor/jscolor.js
  2. turn all related <input> elements into <input class="color">

Examples

  1. Basic usage
  2. Tweaking
  3. Picker modes HSV/HVS
  4. Picker position
  5. Picker borders & face
  6. Picker color scheme
  7. Showing/hiding the picker
  8. Onchange event
  9. Getting the color
  10. Setting the color
  11. Linking foreign elements
  12. Manual binding (AJAX)
  13. Performance test

Tags

online web www javascript java script js dhtml dynamic html compact simple small smooth ajax rgb hsv hex color colour pick picker colorpicker palette pallet spectrum select selection selector getter generator form forms input field dropdown popup pop-up context dialog panel window box control plugin module component extension widget tool toolkit applet library pack package