Skip to content

Convert RGB to Hex in Python

Advertisements

print(('{:02X}' * 3).format(102, 10, 124)) 

#660A7C

See also  Python code snippet - How to get rid of all null values in array ?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.