Artur_Hellmann's avatar
Artur_Hellmann
Iron Contributor
Jun 12, 2025
Status:
New

Get Design Colors Properly

We need a way to get the design colors (and the font, but we can get those through the CustomTheme.css).

So all font and background colors plus accent ones.

The problem in CustomTheme.css is, it returns unreliable values.

If I set all colors like so:


In the css, both classes:
`office-docTheme-primary-fontColor`
`office-docTheme-secondary-fontColor`
have the value of `Text/Background - dark 2`

`office-docTheme-primary-bgColor`
`office-docTheme-secondary-bgColor`
both have the value of `Text/Background - light 1


I thought to use this css to get the documents colors to automatically set shape text colors. But in the css I completely miss the `Text/Background - dark 1` color... So even to color things in my addIn like in the presentation this is useless...

One possible fix is to fix the mapping in the css file

The other is, to give us an interface call (for example on the `SlideMaster` interface) to get the color set that the user set to the master.

No CommentsBe the first to comment