The calculation for the smooth transition is cCol + (nCol-cCol) * Δrow / 16 where cCol is a 3 cell vector containing the current colour, nCol a 3 cell vector containing the next colour and Δrow is the current row modulo 16.