- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to use your Office Theme as Power BI Report Theme
With Report Themes (preview feature in Power BI Desktop) you can apply a color theme to your entire report, such as corporate colors.
Do you already have a corporate color palette in Microsoft Office (Word, PowerPoint, Excel etc.) and want to use it Power BI Desktop? I have created an Excel File that converts the Office Theme Colors into a Power BI Desktop Theme in 4 simple steps:
- Select the Office Theme Color in Excel from the Page Layout tab
- The embedded VBA code will create the hex codes for the color palette
- Name your theme
- Preview the theme and save it (via dialog) in your preferred folder
You can download the file from my OneDrive (since it contains forms and VBA you can't run it in Excel Online):
Office Theme Converter v3 as zip file
If you have any suggestions, improvements, comments etc. please let me know 🙂
Thank you and have fun converting your existing Office Design Colors to Power BI Desktop!
Dominik Petri
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
you can download the updated version in which I fixed the hex codes bug here:
Office Theme Converter v3 as zip file
Let me know what you think!
Thanks
Dominik Petri.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why is it, that when opened in Excel there is no Marco assigned to the Convert button?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The macros are definitely in the file and assigned to the button. I suspect that due to your security settings the macros got disabled...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for sharing. Worked perfectly!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Newbie question - I have downloaded your file and converted my branding colors and saved as a JSON... But now what do I do with it? I know I can upload JSON files into PowerBI but I'm not sure that's the action to take. How do I actually get these colors inside my dashboard in Power BI?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have a look here:
https://docs.microsoft.com/en-us/power-bi/desktop-report-themes
Kind regards,
Dominik.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for posting this. Worked like a charm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad that you like it. Please give kudos to the original post 😉
Thank you! 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This macro worked perfectly. I didn't have to get the hex codes for all the colors in our corporate theme and make my own JSON.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Sorry if this turns up as a duplicate, my first attempt seems to have been lost! I've got the workbook downloaded, but as soon as I click the button to generate the hex codes, the JSON preview cell just displays #NAME? this happens whether I have changed the theme or not, even with the theme that the book came with. It starts off ok, displaying a preview, but as soon as that hex button is clicked, the preview stops working. Click into the box and you can see the formula, but no sensible output?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Susan,
I guess this is due to the fact that I used the TEXTJOIN function in Excel. This function is only available in the Office 365 Edition of Excel 2016.
You can download a version (zip file) here that does NOT use this function:
Office Theme Converter v2 as zip file
Hope this helps
Dominik.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great thank you, that's done the trick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very neat, but it looks like the Hex2Dec function returns the bytes in the wrong order. I believe the hex code should be the same as the web color code. If so, it seems like the first and third bytes are reversed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@npnigro your are completely right. I've already fixed this problem and will have the file changed by the admin shortly.
The VBA property RGB returns the hex code in the order BGR instead of RGB - which I didn't know but do know now 🙂
Best regards
Dominik.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
you can download the updated version in which I fixed the hex codes bug here:
Office Theme Converter v3 as zip file
Let me know what you think!
Thanks
Dominik Petri.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Although it has been some time since you posted this, the tool you built is really cool! Well done, @DominikPetri!
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I tried to download the Excel file from OneDrive I got the following message:
"Features that we can't show in the browser and interactive reports will be removed from the downloaded copy."
After I downloaded the file I had to insert the "Generate Hex-Codes for Colors" and "Save as JSON" buttons and assign the corresponding macros.
Because I use Excel 2013 and Textjoin is a new Excel 2016 formula I had to replace the third line of the formula on row 25 with:
CHAR(34) & "dataColors" & CHAR(34) & ": [ " & Accent_1 &","& Accent_2 &","& Accent_3 &","& Accent_4 &","& Accent_5 &","& Accent_6 &","& Hyperlink &","& Followed_Hyperlink & " ]," & CHAR(10) &
After that everything worked fine. Thanks!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I tried to download the excel file from OneDrive I got the following message:
"Features that we can't show in the browser and interactive reports will be removed from the downloaded copy."
After I downloaded the Excel file I had to insert the "Generate Hex-Codes for Color" and the "Save as JSON" buttons, and assign the corresponding macros.
I have Excel 2013 and because Textjoin is a new Excel 2016 function I had to replace the third line of the formulas on row 25 with:
CHAR(34) & "dataColors" & CHAR(34) & ": [ " & Accent_1 &","& Accent_2 &","& Accent_3 &","& Accent_4 &","& Accent_5 &","& Accent_6 &","& Hyperlink &","& Followed_Hyperlink & " ]," & CHAR(10) &
After that, everyting worked fine. Thanks!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @dcanalesg,
Glad that you like it. If you download the file to YOUR OneDrive first, the buttons should be there.
Nevertheless, thanks for posting your solution and your formula for those who use Excel 2013 (or Excel 2016 without Office 365) and therefore don't have TEXTJOIN.
I will (hopefully) soon finish a blog post with an alternate download link....and a version without TEXTJOIN 🙂
As soon as the blog post is online, I will post the link here.
Dominik.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Dominik,
I really like your idea and think it's very useful. Thanks a lot.
Regards,
Lars

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
Anonymous
| 12-14-2023 02:56 AM | ||
02-23-2024 06:44 AM | |||
04-11-2024 10:50 AM | |||
Anonymous
| 08-30-2019 03:07 AM | ||
Anonymous
| 08-16-2021 12:50 PM |
User | Count |
---|---|
87 | |
81 | |
53 | |
38 | |
35 |