Fix bug in color tweening algorithm