If you don't want to add all the halts, just try putting the if's in reverse order for the colour change. That way it's already past the line it would change the next time round.
if (%color == 13) { unset %color }
if (%color == 11) { set %color 13 }
if (%color == 10) { set %color 11 }
if (%color == 9) { set %color 10 }
if (%color == 7) { set %color 9 }
if (%color == 4) { set %color 7 }
if (%color == 3) { set %color 4 }
if (%color == 2) { set %color 3 }