function RGBToHex (color) {
var hex = color.toString(16);
if (hex.length == 1) {
hex = '0' + hex
}
return hex;
}
function getHEX(color) {
return `${RGBToHex(color.r*255.0)}${RGBToHex(color.g*255.0)}${RGBToHex(color.b*255.0)}`
}
let hexx = parseInt(getHEX(colors), 16);