
I noticed a post on LinkedIn from Bülent Altinsoy recently where he pointed out that Microsoft has released a new Theme Designer for Model-Driven Apps. It’s a solution you can download and import which adds a model-driven app of its own which allows you to set a new theme a bit easier. I’d added a modern theme in my own environment about 2 years ago so was curious how this would work. While digging around in the documentation I was very happy to stumble on the ability to set a different theme per app! Although I suggest checking out what Bülent shared, setting a theme per app can only be done by creating your own solution at this time. Take a look and see if this is something you might like to do!
First things first, the modern themes is STILL in Preview. Using the trusty way back machine, it appears this was first added in Preview back in September 2023-ish. My good friend Jeroen Scheper wrote a blog on it in May 2024, but it has had a few adjustments since then. The current documentation explains how to create a custom theme, but I have shared the basics of an example below. It’s quite limited in terms of what you can do, and there is currently no way to set your logo using this method, so would still need to go old school initially for your theme to get that on there.
<CustomTheme
basePaletteColor="#732773"
vibrancy="50"
hueTorsion="44"
font="Segoe UI"
>
<AppHeaderColors
background="#482542"
foreground="#F7CCDE"
backgroundHover="#313131"
foregroundHover="#FFFFFF"
backgroundPressed="#494949"
foregroundPressed="#FFFFFF"
backgroundSelected="#717171"
foregroundSelected="#FFFFFF"
/>
</CustomTheme>
Once you’ve got your XML, save it somewhere as a .xml file. Then upload it as a web resource with the file type of Data. Give it a display name and then publish it. Make a note of the name, you will need this shortly.
Now go in to the Default solution and search for the settings object and click on Settings. From there you can search for theme and find the Custom theme definition.
Click on the add existing value option to override the default. Then past in the name of the web resource you created. One thing a little quirky, even after you’ve saved the new value then open the custom theme definition setting again, it doesn’t display until you click add existing value. It’s a bit odd. Once it’s in there, it’s saved but I had to check a few times to be sure.
Once you’ve made the change, refresh, clear your cache, run around in circles three times and you will see your change. 
Ok here is the awesome part. If you step back, and instead of doing stuff in the default solution, create a nice new solution and add in the Custom theme definition settings. Then add in at least one model-driven app (MDA). What we see now when we open up the Custom theme definition setting is the ability to set app values!
Now I have a second Data XML theme file I’ve created which is a blue theme. I uploaded it as a web resource and got the name of it.
<CustomTheme
basePaletteColor="#3ba1da"
vibrancy="50"
hueTorsion="44"
font="Segoe UI"
>
<AppHeaderColors
background="#2e7fb1"
foreground="#ffffff"
backgroundHover="#24668d"
foregroundHover="#ffffff"
backgroundPressed="#1c4f6d"
foregroundPressed="#ffffff"
backgroundSelected="#3ba1da"
foregroundSelected="#ffffff"
/>
</CustomTheme>
Now for just the Marketing MDA (Customer Insights – Journeys) I add the name of my second theme. All other MDA’s will use the environment value above it. Save the setting, then republish the app you applied the new theme value to.
And voila!!! A beautiful blue theme for the marketing app, and the equally beautiful purple theme for all other apps. For me, this is a game changer to help provide differentiation for people using different apps and switching between them. It’s rare that a regular user is switching between environments but very common for them to switch between apps.
Thank you Microsoft, now just take it out of PREVIEW please! 


Original Post http://meganvwalker.com/custom-themes-per-app-not-just-per-environment/