Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
I am looking to assign specific colors to specific values in the JSON theme. Is this possible?
For example, if the Company Name is "Facebook" use "#235eb5", if the Company Name is "Honda" use "#dd0f31", etc. (Hex codes not correct).
The only way I have found to do this is to go into each visualizations formatting and manually set the conditional formatting. I would like the theme to detect the values and assign the colors.
Solved! Go to Solution.
Hi @Todd88 ,
No, the Power BI theme JSON file does not currently support assigning colours to specific dimension values (e.g. "Facebook" = blue, "Honda" = red) automatically. Themes can define colour palettes and default formatting, but value-based conditional formatting must be configured manually or via rules inside visuals.
| #235eb5 | |
| Honda | #dd0f31 |
✅ If this response resolved your issue, please mark it as correct to help other members of the community.
If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster.
Connect with me on LinkedIn
Hi @Todd88,
I would like to let you know that unfortunately Power BI themes (defined in a theme.json file) cannot dynamically assign colors to specific categorical values(Ex: Facebook, Honda and etc)
Power BI themes can only do global color palettes (data colors, backgrounds, text), specific visualization style default, global font sizes, gridlines, etc.
But there is a workaround, by using below meassure you can achieve you requirement. Then, in each visual use this measure for conditional formatting on the data color. You can reuse this measure across all visuals.
CompanyColor =
SWITCH(
SELECTEDVALUE('Company'[Company Name]),
"Facebook", "#235eb5",
"Honda", "#dd0f31",
"Google", "#4285F4",
"Apple", "#A2AAAD",
"#808080" // default color
)
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
Hi @Todd88 ,
No, the Power BI theme JSON file does not currently support assigning colours to specific dimension values (e.g. "Facebook" = blue, "Honda" = red) automatically. Themes can define colour palettes and default formatting, but value-based conditional formatting must be configured manually or via rules inside visuals.
| #235eb5 | |
| Honda | #dd0f31 |
✅ If this response resolved your issue, please mark it as correct to help other members of the community.
If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster.
Connect with me on LinkedIn
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 37 | |
| 31 | |
| 27 |