Forum Discussion

admin_xlsior's avatar
admin_xlsior
Post Prodigy
7 years ago

Visualization: set JSON theme for Alternate bakcground and Alternate font

Hi guys,

 

I have this JSON file for a theme from Internet. How if I want to change / add to setting my table / matrix : Alternate background color and Alternate font color ?

 

I also want the Background color of Title of all my visualization set into something.

 

The code as below:

{
 "name": "Acterys",
 "background": "#373f51",
 "foreground": "#C3D1D7",
 "tableAccent": "#61d1e1",
 "dataColors": [
  "#5B6170",
  "#00828C",
  "#61D1E1",
  "#9DD9D2",
  "#828C82",
  "#dc1975",
  "#373f51",
  "#00828c",
  "#FFB997"
 ],

 "visualStyles": {
  
  "*": {
   "*": {
    "datalabels": {
  "color":{"solid":{"color":"#F17925"}}
  }}},
  
    "*":{
            "*":{
                "*":[{
                    "responsive":true,
        "wordWrap":true,
                    "fontSize":11
                }],
       "wordWrap":[{
        "show":true
                }],
                "labels":[{
                    "show":true,
                    "labelOrientation":"horizontal",
     "color":{"solid":{"color":"#F5F6F6"}},
     "fillcolor":{"solid":{"color":"#6A6F7C"}},
     "enableBackground": true
                }],
                "categoryLabels":[{
                    "show":true,
     "labelColor":{"solid":{"color":"#D1D2D6"}}
                }],
                "categoryAxis":[{
                    "showAxisTitle":true,
     "labelColor":{"solid":{"color":"#D1D2D6"}}
                }],
                "valueAxis":[{
                    "showAxisTitle":true,
     "labelColor":{"solid":{"color":"#D1D2D6"}}
                }]
      }
     },
  
  
  "slicer": {
   "*": {
    "general": [{
     "outlineColor": { "solid": { "color": "#C8C8C8"}},
     "outlineWeight": 1,
     "orientation": "vertical",
     "responsive": true
    }],
    "data": [{
     "mode": "Basic",
     "relativeRange": "",
     "relativePeriod": ""
    }],
    "selection": [{
     "selectAllCheckboxEnabled": false,
     "singleSelect": true
    }],
    "header": [{
     "show": true,
     "fontColor": { "solid": { "color": "#C8C8C8"}},
     "background": { "solid": { "color": "#373f51"}},
     "outline": "None",
     "textSize": 10,
     "fontFamily": "Segoe UI"
    }],
    "date": [{
     "fontColor": { "solid": { "color": "#C8C8C8"}},
     "background": { "solid": { "color": "#373f51"}},
     "textSize": 10,
     "fontFamily": "Segoe UI"
    }],
    "items": [{
     "fontColor": { "solid": { "color": "#C8C8C8"}},
     "background": { "solid": { "color": "#373f51"}},
     "outline": "None",
     "textSize": 11,
     "fontFamily": "Segoe UI"
    }
    ]
   }
 },
 
"page": {
      "*": {
        "background": [{
            "color": {
              "solid": {
                "color": "#373f51"
              }
            },
            "transparency": 0
          }
        ],
        "outspace": [{
            "color": {
              "solid": {
                "color": "#373f51"
              }
            },
            "transparency": 0
          }
        ]
      }
    }}}

 

 

Thanks in advance.

6 Replies

  • v-xicai's avatar
    v-xicai
    Community Support

    Hi admin_xlsior,

     

    You can import the theme JSON file from picture below. Conditional colors are not supported for Power BI themes.

     

    You can go through the links to learn more :https://docs.microsoft.com/en-us/power-bi/desktop-report-themes

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

     

    Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.

     

    Best Regards,

    Amy

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • admin_xlsior's avatar
      admin_xlsior
      Post Prodigy

      Hi thanks,

       

      Yes, they are also my references, but unfortunately not working.

      • v-xicai's avatar
        v-xicai
        Community Support

        Hi admin_xlsior ,

         

        Could you please show me the error information for further analysis ? If you need customize the theme color ,you can download the Color Theme Generator.

         

        Best Regards,

        Amy

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-xicai's avatar
    v-xicai
    Community Support

    Hi  admin_xlsior ,

     

    Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case.

     

    Best regards

    Amy Cai