Search code examples
powerbipowerbi-embedded

Building a Power BI JSON theme while embedding, how do I target "Wallpaper" color?


I'm trying to build a Power BI JSON theme, when embedding a Power BI report. How do I target this property "Wallpaper"?

enter image description here

I tried this, but does not seem to change iot.

{
    "visualStyles": {
        "page": {
            "*": {
                "background": [
                    {
                        "color": {
                            "solid": {
                                "color": "#121212"
                            }
                        },
                        "transparency": 0
                    }
                ],
                "wallPaper": [
                    {
                        "color": {
                            "solid": {
                                "color": "#121212"
                            }
                        },
                        "transparency": 0
                    }
                ]
            }
        },
        "*": {
            "*": {
                "*": [
                    {
                        "fontFamily": "Segoe UI",
                        "color": { "solid": { "color": "#252423" } },
                        "labelColor": { "solid": { "color": "#FFFFFF" } },
                        "secLabelColor": { "solid": { "color": "#FFFFFF" } },
                        "titleColor": { "solid": { "color": "#FFFFFF" } }
                    }
                ],
                "labels": [
                    {
                        "color": { "solid": { "color": "#FFFFFF" } }
                    }
                ],
                "categoryLabels": [
                    {
                        "color": { "solid": { "color": "#FFFFFF" } }
                    }
                ],
                "border": [
                    {
                        "show": true,
                        "color": { "solid": { "color": "#484644" } },
                        "radius": 2
                    }
                ],
                "dropShadow": [
                    {
                        "color": {
                            "solid": {
                                "color": "#FFFFFF"
                            }
                        },
                        "show": true,
                        "position": "Outer",
                        "preset": "Custom",
                        "shadowSpread": 1,
                        "shadowBlur": 1,
                        "angle": 45,
                        "shadowDistance": 1,
                        "transparency": 95
                    }
                ]
            }
        }
    }
}

Solution

  • Customizing the current theme using Power BI Desktop is fast and simple. Follow the steps in Use report themes in Power BI Desktop - Power BI | Microsoft Learn. You can save and export json for customized theme.

    Once you get the JSON object for customized theme, you can apply theme to report either at load time by passing theme in embedConfig or apply theme to report at runtime using applyTheme API.

    References:

    Apply report themes in a Power BI embedded analytics application | Microsoft Learn