How to add settings to custom Drupal themes
One feature I used to find missing in Drupal was the builtin ability to have themes include their own settings, like modules do.
For instance, a theme might allow switching renderings on the fly, without needing activation of specific stylesheets, or CSS or code tweaking, just by choosing parameters in an administration UI. But it was impossible. That is, until tonight.
Since a direct implementation in core seemed unlikely to see the day before 4.8/5.0, I created a proof-of-concept module just for this, called "themesettings".
The details and full source are available as a small demo which adds a "background" setting to a variant of the box_grey PHP theme, to define the background color of all nodes on the fly, just by choosing it from admin/themes/settings2/<chosen theme>
. To read and download the code involved... :