Last active
July 4, 2016 16:08
-
-
Save molarmanful/da91bb6ea2a16c337e5a to your computer and use it in GitHub Desktop.
RGB2HEX - a golfed ES6 function that converts RGB values in the form of 'r g b'.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h=>'#'+h.split` `.map(x=>(x<16?0:'')+(x*1).toString(16)).join`` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment