Skip to content

Instantly share code, notes, and snippets.

@SidJain1412
Created April 7, 2021 12:52
Show Gist options
  • Save SidJain1412/49e25ed1261f88153a6342f88938caf6 to your computer and use it in GitHub Desktop.
Save SidJain1412/49e25ed1261f88153a6342f88938caf6 to your computer and use it in GitHub Desktop.
Python Random Hex
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