def compute_transition_table(init, target, iterations):
    """Compute a list of values for a smooth transition 
    between 2 numbers. 
    
    Args:
        init (int): initial value
        target (int): target value
        iterations (int): number of in-between values to create
    
    Returns:
        list: the transition list
    """
    # Get the increment and create the inital table
    if target < init:
        incr = -1
    else:
        incr = 1
    tmp_range = [i for i in range(init, target, incr)]
    # if tmp range is 0 len, that means there is no change for this color,
    if len(tmp_range) is 0:
        tmp_range.append(target)
    # If the range is too long, pop some values until we are ok
    pop_index = 1
    while len(tmp_range) > iterations:
        tmp_range.pop(pop_index % len(tmp_range))
        pop_index += 4

    # If the range is too short, add some values twice until we are ok
    insert_index = 0
    while len(tmp_range) < iterations:
        insert_index = insert_index % len(tmp_range)
        tmp_range.insert(
            insert_index, tmp_range[insert_index-1 if insert_index-1 > 0 else 0])
        insert_index += 4

    # Pop the first and append the index
    tmp_range.pop(0)
    tmp_range.append(target)
    return tmp_range