Fix an exception or crash when choosing unnamed colors for themes.

Fix possible error "Control does not support transparent background colors" when modifying themes.
Fix changes to the active theme not being saved reliably.