nwhta,
function RandomHex() {
var hexRandomColor = "012345789ABCDF".split(""),temp, index, i;
function searchColor() {
for (i = 0; i < hexRandomColor.length; i++)
{index = hexRandomColor.length * Math.random()|0;
temp = hexRandomColor[i];
hexRandomColor[i] = hexRandomColor[index]
hexRandomColor[index] = temp
}
return hexRandomColor.splice(-6).join("");
}
return {rc : searchColor}
}
var hex = new RandomHex();
alert(hex.rc());
alert(hex.rc());