a map of integer keys to RGB colors, not containing keys that differ by more than 2^10,
mutated so that its keys are the integers from the lowest to highest initial keys, inclusive,
and each key k maps to the RGB color:
prev and next be the nearest lower and higher initial keys, respectively,
the linear interpolation between colors[prev] and colors[next], rounded (half up), at t equal to
k's fractional distance from prev to nextthe number of keys added to colors
Fill in a multicolor gradient that transitions between the provided colors in the specified steps. All colors are [r,g,b] tuples of integers 0 <= r,g,b <= 255.
For example, given:
Modifies the input to contain:
and returns 3.