Created
November 27, 2019 06:38
-
-
Save sudevschiz/8736c7f6f7c0757be95c28481a33fb44 to your computer and use it in GitHub Desktop.
Generate list of N random HEX values, which can be used as coloring palettes in plotting libaries
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 rand_color_gen(n=1): | |
h_v = [] | |
for i in range(0,n): | |
i+=1 | |
r = lambda: random.randint(0,255) | |
h_v.append('#%02X%02X%02X' % (r(),r(),r())) | |
return h_v | |
# Just random colors. No guarantee of any sort. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment