a guest May 24th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- const RGBToHex = (r, g, b) => ((r << 16) + (g << 8) + b).toString(16).padStart(6, '0');
- RGBToHex(255, 165, 1); // 'ffa501'
RAW Paste Data