Forum Discussion

UlrickT's avatar
UlrickT
Frequent Visitor
9 years ago
Solved

Report Theme Colors

I know that its possible to make a list of DataColors in a JSON file. But what is the logic behind them? In which order are these used when applying the Theme to e.g. a PIE chart? 

 

It seems to be rather random, and if so then the "only" thing the Theme does is to list the "defined" colors in the color-picker so you dont have to search for them all the time. But it isnt so that it is applied in a specific order throughout the report.

 

Anyone know the logic?

  • Hi UlrickT,

     

    Yes, the colors show up as you list them in the JSON. Power BI extends the colors from lighter to it. After all, the colors listed in the JSON aren't enough. 

    {
        "name": "St Patricks Day",
        "dataColors": ["#568410", "#3A6108", "#70A322", "#915203", "#D79A12", "#bb7711", "#114400", "#aacc66"],
        "background":"#FFFFFF",
        "foreground": "#3A6108",
        "tableAccent": "#568410"
    }

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Best Regards!

    Dale

5 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi UlrickT,

     

    According to my test, Power BI uses the color along the horizontal of the color-picker, which could avoid two similar colors getting together.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Best Regards!

    Dale

    • UlrickT's avatar
      UlrickT
      Frequent Visitor

      In which order do they show up? Is that in the order you listed the HEX in the JSON?

      • v-jiascu-msft's avatar
        v-jiascu-msft
        Microsoft Employee

        Hi UlrickT,

         

        Yes, the colors show up as you list them in the JSON. Power BI extends the colors from lighter to it. After all, the colors listed in the JSON aren't enough. 

        {
            "name": "St Patricks Day",
            "dataColors": ["#568410", "#3A6108", "#70A322", "#915203", "#D79A12", "#bb7711", "#114400", "#aacc66"],
            "background":"#FFFFFF",
            "foreground": "#3A6108",
            "tableAccent": "#568410"
        }

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

        Best Regards!

        Dale