is the flame coloration a test for the metal or for the acid radical?

In most cases it is the metal but in some cases it is the metal oxide