Ever since the introducing of style mixing back in whenever-that-was, the theme (which affects things like colors, lemming types, etc.) has to be tracked separately from pieces. For this reason, when building a level, it can be easy to forget to change this, leading to orig_dirt's color schemes basically becoming the default since "oops, I forgot to change it to match the primary style!"
I'd suggest creating an "auto" setting for theme, and making it the default for new levels. When auto is selected, the theme will be taken from the style from which the most terrain pieces and objects are taken. This might not always get it right - for example, if you have a primary style with a few really big pieces decorated by many smaller pieces from a different style - but you'd still be able to explicitly specify.
A possible edge case would be if there are any ties. If this happens, use something like alphabetical order to determine the result. If the result is determined during player runtime, I wouldn't suggest using something like styles.ini - the final result should have an objectively correct answer that's not dependent on the player's settings. However, the editor could bake it into the level (in which case the player would not need to know about it) - though this has the disadvantage of losing auto when the level is saved for the first time. This could be countered by having the editor save the result of auto in the level, but also store the fact that the theme was set to auto; the editor would then load auto, while the player would load the result.