Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rgb2hex
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