public/javascripts/yui/colorpicker/colorpicker.js
function () {
            var ID = this.ID,
                O  = this.OPT;

            this.hueSlider.subscribe("change",
                this._onHueSliderChange, this, true);
            this.pickerSlider.subscribe("change",
                this._onPickerSliderChange, this, true);

            Event.on(this.getElement(ID.WEBSAFE_SWATCH), "click", function(e) {
                   this.setValue(this.get(O.WEBSAFE));
               }, this, true);

            Event.on(this.getElement(ID.CONTROLS_LABEL), "click", function(e) {
                   this.set(O.SHOW_CONTROLS, !this.get(O.SHOW_CONTROLS));
                   Event.preventDefault(e);
               }, this, true);

            this._attachRGBHSV(ID.R, O.RED); 
            this._attachRGBHSV(ID.G, O.GREEN); 
            this._attachRGBHSV(ID.B, O.BLUE); 
            this._attachRGBHSV(ID.H, O.HUE); 
            this._attachRGBHSV(ID.S, O.SATURATION); 
            this._attachRGBHSV(ID.V, O.VALUE); 

            Event.on(this.getElement(ID.HEX), "keydown", function(e, me) {
                    me._hexFieldKeypress(e, this, O.HEX);
                }, this);

            Event.on(this.getElement(this.ID.HEX), "keypress",
                this._hexOnly, this,true);
            Event.on(this.getElement(this.ID.HEX), "blur", function(e, me) {
                    me._useFieldValue(e, this, O.HEX);
                }, this);
        }
function () {
            var ID = this.ID,
                O  = this.OPT;

            this.hueSlider.subscribe("change",
                this._onHueSliderChange, this, true);
            this.pickerSlider.subscribe("change",
                this._onPickerSliderChange, this, true);

            Event.on(this.getElement(ID.WEBSAFE_SWATCH), "click", function(e) {
                   this.setValue(this.get(O.WEBSAFE));
               }, this, true);

            Event.on(this.getElement(ID.CONTROLS_LABEL), "click", function(e) {
                   this.set(O.SHOW_CONTROLS, !this.get(O.SHOW_CONTROLS));
                   Event.preventDefault(e);
               }, this, true);

            this._attachRGBHSV(ID.R, O.RED); 
            this._attachRGBHSV(ID.G, O.GREEN); 
            this._attachRGBHSV(ID.B, O.BLUE); 
            this._attachRGBHSV(ID.H, O.HUE); 
            this._attachRGBHSV(ID.S, O.SATURATION); 
            this._attachRGBHSV(ID.V, O.VALUE); 

            Event.on(this.getElement(ID.HEX), "keydown", function(e, me) {
                    me._hexFieldKeypress(e, this, O.HEX);
                }, this);

            Event.on(this.getElement(this.ID.HEX), "keypress",
                this._hexOnly, this,true);
            Event.on(this.getElement(this.ID.HEX), "blur", function(e, me) {
                    me._useFieldValue(e, this, O.HEX);
                }, this);
        }
function ( ) { var ID = this . ID , O = this . OPT ; this . hueSlider . subscribe ( "change" , this . _onHueSliderChange , this , true ) ; this . pickerSlider . subscribe ( "change" , this . _onPickerSliderChange , this , true ) ; Event . on ( this . getElement ( ID . WEBSAFE_SWATCH ) , "click" , function ( e ) { this . setValue ( this . get ( O . WEBSAFE ) ) ; } , this , true ) ; Event . on ( this . getElement ( ID . CONTROLS_LABEL ) , "click" , function ( e ) { this . set ( O . SHOW_CONTROLS , ! this . get ( O . SHOW_CONTROLS ) ) ; Event . preventDefault ( e ) ; } , this , true ) ; this . _attachRGBHSV ( ID . R , O . RED ) ; this . _attachRGBHSV ( ID . G , O . GREEN ) ; this . _attachRGBHSV ( ID . B , O . BLUE ) ; this . _attachRGBHSV ( ID . H , O . HUE ) ; this . _attachRGBHSV ( ID . S , O . SATURATION ) ; this . _attachRGBHSV ( ID . V , O . VALUE ) ; Event . on ( this . getElement ( ID . HEX ) , "keydown" , function ( e , me ) { me . _hexFieldKeypress ( e , this , O . HEX ) ; } , this ) ; Event . on ( this . getElement ( this . ID . HEX ) , "keypress" , this . _hexOnly , this , true ) ; Event . on ( this . getElement ( this . ID . HEX ) , "blur" , function ( e , me ) { me . _useFieldValue ( e , this , O . HEX ) ; } , this ) ; }
Adds event listeners to Sliders and UI elements.  Wires everything
up.

@method _bindUI
@protected
Adds event listeners to Sliders and UI elements . Wires everything up .