Godtone (talk | contribs)
Godtone (talk | contribs)
Line 1,175: Line 1,175:
# 29 colours is a fairly ideal rainbow; we use it for indexing into, so as to derive a 17-colour palette.
# 29 colours is a fairly ideal rainbow; we use it for indexing into, so as to derive a 17-colour palette.
# note that i chose the +0.4 experimentally based on the colour palette that seemed most distinct to me.
# note that i chose the +0.4 experimentally based on the colour palette that seemed most distinct to me.
def cols(cs, n, offset=0):
def cols(cs, n, offset=0.4):
return [ cs[round( k/n*len(cs) + offset/len(cs) )%len(cs)] for k in range(n) ]
return [ cs[(round( i/n*len(cs) )+offset)%len(cs)] for i in range(n) ]
rb17v2 = [ rb29[round( k/17*29+0.4 )%29] for k in range(17) ]
rb17v2 = cols(rb29,17)
rb19 = [ rb29[round( k/19*29+0.4 )%29] for k in range(19) ]
rb19 = cols(rb29,19)
colmaps = { 12: rb12, 13: rb13, 16: cm16, 17: rb17, 18: rb18, 19: rb19, 29: rb29, 30: rb30, 31: rb31, 36: rb36 }
colmaps = { 12: rb12, 13: rb13, 16: cm16, 17: rb17, 18: rb18, 19: rb19, 29: rb29, 30: rb30, 31: rb31, 36: rb36 }
# TODO: add more colmaps
# TODO: add more colmaps