Guest User

Untitled

a guest
Dec 12th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. def make_color_scale(steps, R=None, G=None, B=None, _min=0, _max=200):
  2. scale = []
  3. for n in range(_min, _max, int(_max/steps)):
  4. cc = (hex(n)[2:]).upper()
  5. if len(cc) == 1: cc = "0%s"%cc
  6. r = R or cc
  7. g = G or cc
  8. b = B or cc
  9. scale.append("#%s%s%s"%(r, g, b))
  10. return scale
Add Comment
Please, Sign In to add comment