def cycle_colors(chunk, palette=DEFAULT_PALETTE):
 colors = []
 g = itertools.cycle(palette)
 for i in range(len(chunk)):
  colors.append(next(g))
 return colors

def cycle_colors ( chunk , palette = DEFAULT_PALETTE ) : colors = [ ] g = itertools . cycle ( palette ) for i in range ( len ( chunk ) ) : colors . append ( next ( g ) ) return colors
build a color list just cycling through a given palette .