Godtone
Joined 17 December 2020
| 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( | return [ cs[(round( i/n*len(cs) )+offset)%len(cs)] for i in range(n) ] | ||
rb17v2 = | rb17v2 = cols(rb29,17) | ||
rb19 = | 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 | ||