Now Available!

Almost all of my javascript code has been moved over to its new home at The Javascript Toolbox. Please go there to find the latest scripts, information, etc. These pages will remain here for a while for historical purposes in case anyone needs a production copy of old code.
Color Picker
[Javascript Toolbox]  [Example]  [Source]
This widget is used to select a color, in hexadecimal #RRGGBB form. It uses a color "swatch" to display the standard 216-color web-safe palette. The user can then click on a color to select it.

This script is very simple to implement, and can add a lot of style to your page that requires color values!

Because of the size of the table, this color picker may be slow on lower-end machines. Consider your target users when deciding whether or not it operates fast enough.

It also requires AnchorPosition.js and PopupWindow.js.

Note: Why are form elements or <SELECT> boxes showing over top of the DIV-style colorpicker popup? It's not a bug in the javascript - it's a bug/feature of browsers. See this explanation by WebReference.

(View the source of this page to see how easily all this was done!!)

This popup uses a "window" popup. Use this
For browsers that don't support DHTML.
Color: Pick

This popup uses a DHTML "layer". It looks
nicer, but won't work in older browsers and
The color popup won't display over some form
elements in some browsers!
Color: Pick