function to convert rgb to hex code example
Example: hex to rgb function
function hex2RGB(hex){
const r = parseInt(hex.substring(1, 3), 16);
const g = parseInt(hex.substring(3, 5), 16);
const b = parseInt(hex.substring(5, 7), 16);
return `${r}, ${g}, ${b}`;
}