function rgb (r, g, b) {
var n = (r<<16) + (g<<8) + b; //entier base 10
var iValColor=dec2hex(n); //entier en base 16
var sChaineColor='';
for(iCharChaineColor=iValColor.length;iCharChaineColor<6;iCharChaineColor++){
sChaineColor='0'+sChaineColor;
}
return '#' + sChaineColor + iValColor;
}
function dec2hex(dec){
var hexa='0123456789ABCDEF',hex=''
while (dec>15){
tmp=dec-(Math.floor(dec/16))*16;
hex=hexa.charAt(tmp)+hex;
dec=Math.floor(dec/16);
}
hex=hexa.charAt(dec)+hex;
return(hex);
}