This is what you’re looking for:
https://meta.discourse.org/t/allowing-user-to-select-theme/86832/4?u=johani