What is jscolor?

jscolor is a simple & user-friendly color picker for your web forms. It extends all desired <input> fields of a smooth color selection dialog. You can pickerize these inputs in two easy steps: 1. set them to <input class="color"> 2. include script jscolor.js into your HTML page.

Demo

  • 2010-08-16
    Peter Dematté developed an excellent jscolor-inspired color picker jscolorXS
  • 2010-05-05
    jscolor is now available as Adobe Dreamweaver Extension. Thanks to Veeresh Hiremath.
  • 2010-01-23
    jscolor-1.3.1 fixes bug in getElementPos() method.
  • 2009-10-16
    jscolor-1.3.0 released! This branch introduces semicolon syntax, strict comparison operators and hasOwnProperty() filtering to make jscolor resistant to Object.prototype tweaks. No changes in API.
  • 2009-10-07
    jscolor-1.2.4 released.
  • 2009-10-07
    STRd6 has ported jscolor-1.0.9 into jQuery, see jqcolor project.
  • 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 the 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!

Cross-browser compatibility (for release 1.1.2)

Ace Explorersupported
Avant Browser 11.5supported
Firefox 3.6.3supported
Firefox 3.0.3supported
Firefox 2supported
Flock 1.2.1supported
Google Chrome 4.1supported
Google Chrome Betasupported
Internet Explorer 8supported
Internet Explorer 7supported
Internet Explorer 6supported
Internet Explorer 5.5 SP2supported
Internet Explorer 5.01 SP2supported
Konqueror 3.5.4supported
Netscape 8.1supported
Opera 9.64supported
Opera 9.01supported
Safari 3.1.2supported
Safari 3.0.4partially supported
Safari (iPhone 3G)supported
SeaMonkey 1.0.5supported

Author & License

GNU LGPL jscolor project is maintained by Jan Odvárko 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. If you find jscolor useful and want to repay my work, a small donation would be appreciated.

Download

Latest release is jscolor-1.3.1.zip

Installation

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

Like jscolor?

jscolor is LGPL licensed. If you appreciate my work, you can donate me a drink (-: Thanks!

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 - useful for AJAX applications
  13. Performance test

Tags

free gnu gpl online web interactive javascript java script js dhtml dynamic html compact simple small smooth slider slidable rgb rgba hsl hsla hsv hex pick colour color picker colorpicker colorpallet colorpalette color palette pallet mixer spectrum select selection selector getter generator alpha transparency opacity form forms input field dropdown popup pop-up context dialog panel window box control ajax jquery mootools yui dojo mochikit framework plugin module component extension widget tool toolkit applet library pack package