In March 2017, the Power BI team delivered a new feature that allowed you to change the colour defaults in a Power BI report using a custom colour theme. I wrote a blog post over at PowerPivotPro.com at the time. The drawback of this feature, as it was back in March, was that you needed to write JSON code in order to create the custom colour theme. That actually wasn’t so hard back then when the only thing you could do was change colours. More recently Microsoft has extended the theme concept to include other default settings such as font size and other configurable options. I started to investigate this using the manual JSON concept I blogged about earlier, but quickly found it beyond my “layman” skill level.
Community To The Rescue
As is often the case, someone in the community with a lot more JSON skills than me has come to the rescue and developed a tool to generate the JSON code file for you. This tool developed, by Mike Carlo from PowerBI.Tips, is available to use online at https://powerbi.tips/tools/report-theme-generator-v3/
Let me show you briefly how this tool works and how you can use it.
Selecting Colours for Custom Report Theme
Report Theme Generator can be used to select the colours for your Custom Report Theme. If you have a corporate colour scheme, and let’s face it – who doesn’t, you can find the Hex Colour codes from your style guide and use those. If you are not lucky enough to have a style guide, you can use a tool like FastStone Capture to click anywhere on your screen to find the colour (FastStone Capture is a must have tool for everyone I think – I use it for all my blog posts).
I am creating my theme using my Aussie Rules Footy team colours (Go Crows!). I simply browsed to the website and then used the colour picker tool to find the HEX Codes.
Alternatively you can simply use the inbuilt colour picker from Report Theme Generator as shown below. Simply find the colour you want (#1). The HEX code will be displayed (#2), then you can click Add Selected Color (#3).
I only used 3 colours for my theme as can be seen below. Note that the codes must start with a # and end with a comma (#1 below), then press “Add Below Custom Colors” (#2) . The colours will be added to your theme (#3).
Setting Default Font Size
Setting the default font size is worth the price of the tool alone (did I mention it is free)?! You can change the default font size using the global settings. See my changes below.
With these settings in place, I downloaded my theme using the download button on the left.
And then applied it to an existing report.
Turn On Custom Themes Preview
The Custom Report Themes feature is still in preview. To turn it on, navigate to File\Options and Settings\Options and then select the feature as shown below.
You will have to save, close Power BI and then reopen the report before the feature will be visible. After turning on the preview feature, you can import your theme using the new menu option as shown below.
Here is a report with a few different visuals using the new defaults from my custom theme. The column chart and tree map have picked up the new colour scheme, but not the table and matrix. The new font size has been automatically applied to most items but not the chart headings (#1 and #2).
Back to Report Theme Generator. Unfortunately I couldn’t find a setting for the chart heading. I guess that is still coming (unless someone can enlighten me). I also looked at David Eldersveld’s blog here and it seems there is no setting available.
Other Default Settings
In addition to the global settings (shown below), there are a lot of other defaults you can change for specific visual objects. It is pretty intuitive so just have a browse yourself and see what you can find.
Unfortunately there seems no way to “save” your WIP Theme Generator file. I have sent a message to Mike asking if he can add that. I hope you find this useful.
In case you just want to increase the default font size, here is a json file you can download. 18 pt font theme. Just download the zip file and extract the json file.