Save the original settings
Enter bind F8 and cl_hud_color without additional arguments. Note the existing binding and color. If F8 already performs an action you need, choose a free key and replace it in the example.
Bind the color cycle
Enter bind "F8" "toggle cl_hud_color 3 4 5 6 7 8 9 10 11". Press F8 several times in practice. Each press switches the HUD to the next color in the list. Test the appearance with a separate key before considering additional bindings.
Restore your previous setup
If F8 was unassigned, enter unbind F8. Otherwise restore the command you saved with bind. Restore the original cl_hud_color value too. If you saved the color-cycle line in a CFG, remove it before the next launch.