public/javascripts/yui/colorpicker/colorpicker.js
function(n) {
            n = parseInt(n,10)|0;
            n = (n > 255 || n < 0) ? 0 : n;

            return (ZERO+n.toString(16)).slice(-2).toUpperCase();
        }
function(n) {
            n = parseInt(n,10)|0;
            n = (n > 255 || n < 0) ? 0 : n;

            return (ZERO+n.toString(16)).slice(-2).toUpperCase();
        }
function ( n ) { n = parseInt ( n , 10 ) | 0 ; n = ( n > 255 || n < 0 ) ? 0 : n ; return ( ZERO + n . toString ( 16 ) ) . slice ( - 2 ) . toUpperCase ( ) ; }
Converts an int 0...255 to hex pair 00...FF
@method dec2hex
@param n {int} the number to convert
@return {string} the hex equivalent
Converts an int 0 ... 255 to hex pair 00 ... FF