Forum Discussion
TrevorC
10 months agoAdvocate I
Reference theme dataColors with DAX
As a developer I want to be able to reference data colour hex codes via Dax. I can reference Divergent and Sentent colors but nothing else. The reason I want to do this is to help me create tem...
- 10 months ago
Hi TrevorC - Power BI doesn’t currently expose all theme color hex codes directly to DAX, which limits dynamic formatting and templating potential.
Good Idea, : you can post it in below link:
Fabric Ideas - Microsoft Fabric Community
Hope this helps.
KNP
9 months agoSuper User
Hi TrevorC,
As others have mentioned, not all colours are exposed currently.
Best practice at the moment would be to have a colour table that can be imported into your models and reference HEX/RGBA colours from there. It allows for use in conditional formatting, etc., and as long as your theme colours are constant, it is easy to match your theme.
Bonus points for creating an opposing text colour, taking into account contrast ratios.