This function returns a matrix of RGB values that allow you to gradually change from one color to another using a single index, like the position of a scrollview/springboard.
It takes a two dimensional array of RGB colors, each page width and the total amount of pages.