Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
MagicMads
Helper I
Helper I

Custom Themes

How do you set the background color for all visuals?

1 ACCEPTED SOLUTION
v-caliao-msft
Microsoft Employee
Microsoft Employee

@MagicMads,

 

To apply a Report Theme to a Power BI Desktop report, select Switch Theme button from the Home ribbon, then select Import Theme from the drop-down. A window appears that lets you navigate to the location of the JSON theme file. The basic JSON file selected in the previous section (the St Patricks Day.json file), when opened in an editor, looks like the following.You can change the color in that JSON file.

 

Reference
https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-report-themes/

 

Regards,

Charlie Liao

View solution in original post

3 REPLIES 3
jsh121988
Microsoft Employee
Microsoft Employee

    "visualStyles": {
        "*": {
            "*": {
                "background": [{
                    "show": {
                        "expr": {
                            "Literal": {
                                "Value": "true"
                            }
                        }
                    },
                    "color": {
                        "solid": {
                            "color": {
                                "expr": {
                                    "ThemeDataColor": {
                                        "ColorId": 4,
                                        "Percent": 0
                                    }
                                }
                            }
                        }
                    },
                    "transparency": {
                        "expr": {
                            "Literal": {
                                "Value": "11D"
                            }
                        }
                    }
                }]
} } }

It'll change everything, but this will get you started. I "reversed engineered" a pbit file. The report/layout file is just json, and you can look to the config sections for the theme code. To open pbit contents, rename the extension to .zip and extract. To make it easier to read json, open the file in VSCode, and beautify using JS/JSON. For config sections, you'll need to replace '\"' with '"', and then beautify again.

v-caliao-msft
Microsoft Employee
Microsoft Employee

@MagicMads,

 

To apply a Report Theme to a Power BI Desktop report, select Switch Theme button from the Home ribbon, then select Import Theme from the drop-down. A window appears that lets you navigate to the location of the JSON theme file. The basic JSON file selected in the previous section (the St Patricks Day.json file), when opened in an editor, looks like the following.You can change the color in that JSON file.

 

Reference
https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-report-themes/

 

Regards,

Charlie Liao

Anonymous
Not applicable

This does not change the background color of teh visuals.  Has anyone been able to do this.  If so pls share the JSON code.

Thanks!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.