public/javascripts/yui/colorpicker/colorpicker.js
function ColorPicker(el, attr) {
        _pickercount = _pickercount + 1;
        attr = attr || {};
        if (arguments.length === 1 && !YAHOO.lang.isString(el) && !el.nodeName) {
            attr = el; // treat first arg as attr object
            el = attr.element || null;
        }
        
        if (!el && !attr.element) { // create if we dont have one
            el = this._createHostElement(attr);
        }

    	ColorPicker.superclass.constructor.call(this, el, attr); 

        this.initPicker();
    }
function ColorPicker(el, attr) {
        _pickercount = _pickercount + 1;
        attr = attr || {};
        if (arguments.length === 1 && !YAHOO.lang.isString(el) && !el.nodeName) {
            attr = el; // treat first arg as attr object
            el = attr.element || null;
        }
        
        if (!el && !attr.element) { // create if we dont have one
            el = this._createHostElement(attr);
        }

    	ColorPicker.superclass.constructor.call(this, el, attr); 

        this.initPicker();
    }
function ColorPicker ( el , attr ) { _pickercount = _pickercount + 1 ; attr = attr || { } ; if ( arguments . length === 1 && ! YAHOO . lang . isString ( el ) && ! el . nodeName ) { attr = el ; // treat first arg as attr object el = attr . element || null ; } if ( ! el && ! attr . element ) { // create if we dont have one el = this . _createHostElement ( attr ) ; } ColorPicker . superclass . constructor . call ( this , el , attr ) ; this . initPicker ( ) ; }
A widget to select colors
@namespace YAHOO.widget
@class YAHOO.widget.ColorPicker
@extends YAHOO.util.Element
@constructor
@param {HTMLElement | String | Object} el(optional) The html
element that represents the colorpicker, or the attribute object to use.
An element will be created if none provided.
@param {Object} attr (optional) A key map of the colorpicker's
initial attributes.  Ignored if first arg is attributes object.
A widget to select colors