In principle, yes. In practice, it is much more complex (and you don't need to do it as others have already made the observations)
The colour of a flame test is a consequence of the combination emission lines from electronic transitions in the flame. Most useful lines are narrow and involve transitions in isolated atoms between different electron orbitals. The perceived colour is derived from the strong lines in the visible spectrum (eg the well known sodium lines around 589 nM which look orange and dominate the visible spectrum in flames containing sodium).
The specific position of the lines is far more diagnostic of the substance than the colour which will be a combination of all the strong visible lines and there may be more than one strong line. Some common compounds have fairly distinct colours, though, which is why it is easy to distinguish, for example, lithium (red), sodium (yellow) and potassium (violet/turquoise). This is why even simple flame tests can be useful.
And you don't need to calculate anything to identify the emitting substance in the flame: others have observed the emissions and classified what all the lines represent in terms of the electronic transitions that cause them. This is why techniques such as atomic absorption or emission spectroscopy are often very useful at characterising samples.
As for the original question about whether these lines could be predicted computationally from first principles the answer is, in principle, yes. In practice things are a lot harder because quantum mechanics is hard.
A full picture of all the possible lines could, in principle, be derived from a model of the isolated atom's possible electron energy levels. A very thorough treatment could give a theoretical picture of those levels and all the possible transitions between them. Even the transition probabilities which partly determine the brightness of the lines. This picture when filtered to eliminate the lines in the IR and UV could give a good idea of the colour of the emission spectrum.
But those calculations are hard as an exact value for the electron energies is impossible to do analytically for anything more complex than an isolated hydrogen atom. The amount of computation required to account for all the possible interactions that determine the energy levels is huge and rarely worth doing when it is easier to understand the observed spectrum than it is to calculate it from first principles.
It is also worth noting that the complexity of the possible spectra for even the simplest atom, hydrogen, explains why there are no simple relationships between colour and the individual lines. There are more than 30 relatively simple lines in the hydrogen spectrum that are easily observed and they range from the hard UV to the far IR in wavelength (in principle, there are an infinite number as every possible orbital can contain an electron and every pair of orbitals can generate a unique transition but many of the higher orbitals will rarely contain electrons and will get closer and less distinguishable). Some transitions will only be observed in extreme conditions unlikely to occur in a simple flame. More complex atoms will display far more complex patterns and the number of interactions between orbitals that result in splitting simple energy levels will increase rapidly.
But the biggest reason why simple relationships between colour and the emission lines doesn't follow simple patterns is that visible light only occupies about one octave of the possible electromagnetic spectrum. Actual emissions span wavelengths from the UV to the IR of dozens of octaves. So the wavelengths that determine colour are a small selection from a much larger range of wavelengths. This makes the pattern of colour much more arbitrary than any consistent patterns in the full range of wavelengths. And this view ignores the even harder problem of estimating the relative brightness of the lines which requires a full understanding of the quantum transition probabilities and the likely population of different energy levels at a given temperature.
So, in principle, you could calculate the full range of emission spectra for different atoms and filter it for lines in the visible spectrum and derive some idea of colour. But this is very much harder than observing the emissions from a pure sample and using them to identify an unknown.