Of course, the hex code is encoded as a number, but in order to make any sense, you must first extract the rgb components:
function rgb(string){
return string.match(/\w\w/g).map(function(b){ return parseInt(b,16) })
}
var rgb1 = rgb("#EEEEEE");
var rgb2 = rgb("#FFFFFF");
Then just take the intermediate link from all the components:
var rgb3 = [];
for (var i=0; i<3; i++) rgb3[i] = rgb1[i]+Math.random()*(rgb2[i]-rgb1[i])|0;
And finally rebuild the color as a standard hexadecimal string:
var newColor = '#' + rgb3
.map(function(n){ return n.toString(16) })
.map(function(s){ return "00".slice(s.length)+s}).join('');
, , , , , , RGB (, HSL HSV).