If you use DDNet client, you can use the command: bind mouse1 "+fire;toggle player_color_body 65397 4259701"
That will switch your color from red to blue and back to red whenever you fire. Keep in mind that there is a serverside cooldown for changing your tee color, so you will not see the effect with every mouseclick.
If you don't use DDNet client, you may consider changing your color to e.g. red when you fire, and to blue when you hook:
bind mouse1 "+fire;player_color_body 65397";bind mouse2 "+hook;player_color_body 4259701"
If you wonder where I got these numbers for red and blue from... You can either set your tee color to the color you want and then read out the value of player_color_body, or you can use your OS's calculator to convert hex to decimal. The color is notated as a hex number of the format 0xHHSSLL, where H is hue, S is saturation and L is lighting (just like in the teeworlds settings)