Color Transition Matrix

749
Vote up!

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.

For Example
cm.getBackgroundColorMatrix( tableOfRGBColors, 320, 3)
for 3 colors spread across 320 * 3 pixels

There is an example that uses a springboard included in the gist!

Contributor: 
Tanner Gower