SHARE
TWEET

Untitled

a guest May 24th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const RGBToHex = (r, g, b) => ((r << 16) + (g << 8) + b).toString(16).padStart(6, '0');
  2.  
  3. RGBToHex(255, 165, 1); // 'ffa501'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top