Created
June 24, 2023 17:29
-
-
Save leonelhs/ed70bb648683e737e9e5aba6b0a8a638 to your computer and use it in GitHub Desktop.
converts rgb integers 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 '#%02X%02X%02X' % rgb | |
| print(rgb2hex((20, 110, 56))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment