Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. import colorsys
  2.  
  3. def generateColors(n):
  4.     """
  5.    """
  6.  
  7.     colors = []
  8.     step = 100 / n
  9.     S = 50
  10.     V = 50
  11.  
  12.     for T in range(0, 100, step):
  13.  
  14.         r, g, b = colorsys.hsv_to_rgb(T/100.0, S/100.0, V/100.0)
  15.         colors.append((int(r*255), int(g*255), int(b*255)))
  16.  
  17.  
  18.     return colors
  19.  
  20.  
  21. print generateColors(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement