public/javascripts/yui/colorpicker/colorpicker.js
function() {
            var rgb = this.get(this.OPT.RGB),
                websafe = this.get(this.OPT.WEBSAFE),
                el = this.getElement(this.ID.SWATCH),
                color = rgb.join(","),
                txt = this.get(this.OPT.TXT);

            Dom.setStyle(el, "background-color", "rgb(" + color  + ")");
            el.title = sub(txt.CURRENT_COLOR, {
                    "rgb": "#" + this.get(this.OPT.HEX)
                });


            el = this.getElement(this.ID.WEBSAFE_SWATCH);
            color = websafe.join(",");

            Dom.setStyle(el, "background-color", "rgb(" + color + ")");
            el.title = sub(txt.CLOSEST_WEBSAFE, {
                    "rgb": "#" + Color.rgb2hex(websafe)
                });

        }
function() {
            var rgb = this.get(this.OPT.RGB),
                websafe = this.get(this.OPT.WEBSAFE),
                el = this.getElement(this.ID.SWATCH),
                color = rgb.join(","),
                txt = this.get(this.OPT.TXT);

            Dom.setStyle(el, "background-color", "rgb(" + color  + ")");
            el.title = sub(txt.CURRENT_COLOR, {
                    "rgb": "#" + this.get(this.OPT.HEX)
                });


            el = this.getElement(this.ID.WEBSAFE_SWATCH);
            color = websafe.join(",");

            Dom.setStyle(el, "background-color", "rgb(" + color + ")");
            el.title = sub(txt.CLOSEST_WEBSAFE, {
                    "rgb": "#" + Color.rgb2hex(websafe)
                });

        }
function ( ) { var rgb = this . get ( this . OPT . RGB ) , websafe = this . get ( this . OPT . WEBSAFE ) , el = this . getElement ( this . ID . SWATCH ) , color = rgb . join ( "," ) , txt = this . get ( this . OPT . TXT ) ; Dom . setStyle ( el , "background-color" , "rgb(" + color + ")" ) ; el . title = sub ( txt . CURRENT_COLOR , { "rgb" : "#" + this . get ( this . OPT . HEX ) } ) ; el = this . getElement ( this . ID . WEBSAFE_SWATCH ) ; color = websafe . join ( "," ) ; Dom . setStyle ( el , "background-color" , "rgb(" + color + ")" ) ; el . title = sub ( txt . CLOSEST_WEBSAFE , { "rgb" : "#" + Color . rgb2hex ( websafe ) } ) ; }
Updates the background of the swatch with the current rbg value.
Also updates the websafe swatch to the closest websafe color
@method _updateSwatch
@protected
Updates the background of the swatch with the current rbg value . Also updates the websafe swatch to the closest websafe color