cancel
Showing results for 
Search instead for 
Did you mean: 
DominikPetri

How to use your Office Theme as Power BI Report Theme

Converting your Office Theme Colors to a Power BI Report Theme

Since importing the Office Theme Colors from "%appdata%\Microsoft\Templates\Document Themes\Theme Colors" is not possible, I have created an Excel file and some VBA that converts the selected Office Theme Colors into a Power BI Desktop Report Theme. Simply follow these four easy steps:

 

Step 1: Select the Office Theme Color

Select the color palette you want to convert via Page Layout > Themes > Colors

Select the color palette in the Page Layout tabSelect the color palette in the Page Layout tab

 

 

 

 

 

 

 

 

 

 

 

Step 2: Create the hexcode color codes

The Report Theme JSON file needs the color codes in hexadecimal format. Just click the button “Generate Hex-Codes for Colors” and a few lines of VBA will fill the cells D9 to D20. Since the JSON file needs the hexcodes in double quotes and prefixed by a hashtag, the VBA code adds them as well.

 

The Office Theme Colors and their corresponding hexcodesThe Office Theme Colors and their corresponding hexcodes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 3: Name your theme

Enter a name for your theme in cell F18. The JSON file will be saved (see step 4) under this name so refrain from using special characters.

 

Step 4: Preview and save theme

The formula in B25 uses the hexcodes from cells D9 to D20 to create the text for the JSON file:

 

 Cell B25 shows a preview of your JSON fileCell B25 shows a preview of your JSON file

 

 

 

 

 

 

 

 

 

Now click the “Save as JSON” button and select a folder where you want to save it.

 

If you have any suggestions for improvements, I am more than happy to hear from you and implement them!

 

Dominik Petri

Comments

 Thank you for useful information! Everything is working!

Best regards
Marta.

Polls
What is your favorite Power BI Feature release in July 2021?