async function rgbToHex(r, g, b) {
const toHex = (value) => {
const hex = value.toString(16);
return hex.length === 1 ? '0' + hex : hex;
};
const hexR = toHex(r);
const hexG = toHex(g);
const hexB = toHex(b);
return `#${hexR}${hexG}${hexB}`;
}
module.exports = { rgbToHex };