Created
August 8, 2018 13:58
-
-
Save vaclavcadek/bbfb2b5dada305ec299af37ed928dcdb to your computer and use it in GitHub Desktop.
Transform RGB color to hex.
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
def rgb2hex(rgb): | |
return ''.join([format(val, '02X') for val in rgb]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment