Forum Discussion

benoitdubuc's avatar
benoitdubuc
Regular Visitor
6 years ago

Text classes for theme not working the way I thought

I am trying to set a minimal theme with just color and text classes.

 

{
 "name": "MinimalThemeWClasses",
 "foreground": "#252423",
 "foregroundNeutralSecondary": "#605E5C",
 "foregroundNeutralTertiary": "#B3B0AD",
 "background": "#FFFFFF",
 "backgroundLight": "#F3F2F1",
 "backgroundNeutral": "#C8C6C4",
 "tableAccent": "#118DFF",
 "textClasses": {
      "callout": {
           "fontSize": 25,
           "fontFace": "DIN",
           "color": "#252423"
      },
      "title": {
           "fontSize": 14,
           "fontFace": "DIN",
           "color": "#252423"
      },
      "header": {
           "fontSize": 14,
           "fontFace": "Segoe UI",
           "color": "#252423"
      },
      "label": {
           "fontSize": 14,
           "fontFace": "Segoe UI",
           "color": "#FF0000"
      }
 }
}

When I apply it to my simple report, only the totals in the table visual are red. If I change the fontSize to 24, most of my text in my page change size. It seems I don't undertand what the color parameter does or this is a bug.Size 14, color redSize 24, color red

2 Replies

  • It is because you've set 3 of the text classes to "color": "#252423", which is near-black. If you change these in your file and re-load the theme, you'll see more of the text change color. 

     

    So for example, if you switch the title text class to red you'll see the titles change to red:

    "title": {
    "fontSize": 24,
    "fontFace": "DIN",
    "color": "#252423"
    },

     

    Also note that assuming you did not have these text classes in your minimal theme, the "foreground" color class affects most text color in the PowerBI. So you could also change that color and most of the PowerBI text will change. 

     

    So in short, you are setting the global "foreground" text color currently to a near-black color #252423 and the "foregroundNeutralSecondary" class to a dark grey (which affects many text areas like headers and axes). You are then over-riding these text settings for "callout", "title" and "header" classes to set them to the near-black color #252423. It is only the "label" class that you changed to red #FF0000

     

     

    McKay