while len(colors) < minimum_number_of_colors_needed:
    for index in range(1, len(colors), 2):
        colors.insert(index, mean_color([colors[index - 1], colors[index]]))
How can a list be extended uniformly to include extrapolated mean values?