Converts from an array of numbers like [15, 15, 15] to a hex string like 'FFF'
@param {[red, green, blue]} ref
@returns {string}
function toColorHexString(ref) {
    var results = [];

    for (var j = 0, len = ref.length; j < len; j++) {
        results.push(toHexString(ref[j]));
    }

    return '#' + results.join('');
}