This method requires a little more work than setting a fixed number of steps to fade, but the result
is worth the effort. As it is, the code could to be improved even further: the code could require that the
fade be at least 50 steps if possible. This would prevent short fades in situations where two of the three
colours have large differences, but the fade is short because the third colour is only changing a few
steps.