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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

JSON Theme background color not apply

Hi,

 

Informations: Powerbi Desktop, version 2.70

 

My need is simple: I would like to apply a global color background on all reports.

To perform this need, i've created a JSON fil with the code bellow:

 

{	
    "name": "Custom",
    "dataColors": ["#EE3322", "#FFA300", "#FFEE22", "#C3D600", "#119988", "#7B7EAB", "#B42573", "#998877"],
    "background": "#000000"
}

The background should be black, but it's still in white (default color).

 

Regards,

Pierre Blondel

 

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous, 

 

In your scenario, the "background" means "The background applies to button fill and combo chart label background. How these colors are used depends on the specific visual style that's applied. The table and matrix visuals apply these styles by default." according to this document

 

In your scenario, if you want to set the page background color via custom theme, you can modify your json file like below: 

 

{	
    "name": "Custom",
    "dataColors": ["#EE3322", "#FFA300", "#FFEE22", "#C3D600", "#119988", "#7B7EAB", "#B42573", "#998877"],
    "background": "#FFFFFF",
"visualStyles": {
        "page": {
            "*": {
                "background": [
                    {
                        "color": {
                            "solid": {
                                "color": "#000000"
                            }
                        },
                        "transparency": 0
                    }
                ]
            }
        }
    }
}

Reference: 

https://www.cathrinewilhelmsen.net/2018/12/11/custom-power-bi-themes-page-background-colors/

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous, 

 

In your scenario, the "background" means "The background applies to button fill and combo chart label background. How these colors are used depends on the specific visual style that's applied. The table and matrix visuals apply these styles by default." according to this document

 

In your scenario, if you want to set the page background color via custom theme, you can modify your json file like below: 

 

{	
    "name": "Custom",
    "dataColors": ["#EE3322", "#FFA300", "#FFEE22", "#C3D600", "#119988", "#7B7EAB", "#B42573", "#998877"],
    "background": "#FFFFFF",
"visualStyles": {
        "page": {
            "*": {
                "background": [
                    {
                        "color": {
                            "solid": {
                                "color": "#000000"
                            }
                        },
                        "transparency": 0
                    }
                ]
            }
        }
    }
}

Reference: 

https://www.cathrinewilhelmsen.net/2018/12/11/custom-power-bi-themes-page-background-colors/

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-qiuyu-msft - Can you advise how to custom edit the json to change the background color of the column headers in the table visual as well ? Thanks. Is there a link where we can find all the properties ? I tried editing a table visual with the desired background color of the column headers and export the theme but it didn't capture those properties. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.