GradientSplit

Squares:

Starting color:
Red:
Green:
Blue:

Ending color:
Red:
Green:
Blue:

I'm not checking values here so you can try to do stupid stuff that won't work. Up to you.

Values might be a teensy bit off at the end due to rounding.

View source to see how it works. No code is hidden.

This probably doesn't work in Internet Explorer. Sorry not sorry. (It's because IE uses a different Math object for javascript.)