Improve the automatic theme selection
The selection now first searches for a theme with matching background to the application theme and if available, it just uses that. If no theme with exactly matching background has been found, it just falls back to prior logic and selects the default light or dark theme.
It would probably make sense to match for a few other colors though; the one I can immediately think of is the selection background. Any thoughts about that?