Created
April 7, 2021 12:52
-
-
Save SidJain1412/49e25ed1261f88153a6342f88938caf6 to your computer and use it in GitHub Desktop.
Python Random Hex
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
import numpy as np | |
def random_color(): | |
ltemp = np.random.randint(0, 255, 3) | |
return "#%02x%02x%02x" % tuple(ltemp) | |
# col = random_color() | |
# print(col) | |
# '#eb4de9' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment