Created
March 13, 2016 13:55
-
-
Save linuxenko/fa12a4af2223adddb6e4 to your computer and use it in GitHub Desktop.
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
var color = {r: 186, g: 218, b: 85}; | |
// RGB to HEX | |
var rgb2hex = function(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