def METHOD_NAME(index_color_dict):    # returns a list of 256 colors
    '''
    given a dict of positions and colors, interpolates the colors into a list of 256 colors
    example input: {'0':color.hex('#9d9867'), '38':color.hex('#828131'), '54':color.hex('#5d5b2a'), '255':color.hex('#000000')}
    '''
    gradient = [color.black for i in range(256)]
    gradient_color_keys = tuple(index_color_dict.keys())
    gradient_color_values = tuple(index_color_dict.values())
    for i in range(len(gradient_colors)):
        from_col = color.hex(gradient_color_values[i-1])
        to_col = color.hex(gradient_color_values[i])
        from_num = 0
        if i > 0:
            from_num = int(gradient_color_keys[i-1])
        to_num = int(gradient_color_keys[i])
        dist = to_num - from_num
        for j in range(dist):
            gradient[from_num+j] = lerp(from_col, to_col, j/dist)
    return gradient