Last active
August 29, 2015 14:17
-
-
Save vanrez-nez/cc36f69b45ecc7619f62 to your computer and use it in GitHub Desktop.
Conversion from RGB values to Hex notation
This file contains hidden or 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
function rgb2Hex(r, g, b) { | |
return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).substr(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment