Guest User

Untitled

a guest
Jun 14th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. const rgbToHex = rgb =>
  2. '#' + rgb
  3. .match(/rgb\((\d*), (\d*), (\d*)\)/)
  4. .slice(1,4)
  5. .map(d => Number(d).toString(16).padStart(2, '0'))
  6. .join('')
Add Comment
Please, Sign In to add comment