New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharePoint Online App part cannot inherit the site theme #1793

jerrylu1671 opened this Issue May 4, 2018 · 4 comments


None yet
4 participants

jerrylu1671 commented May 4, 2018


  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

We develop a custom SharePoint Online App part. Following the guide,
and expect the app part can use the same theme color of the site.

Observed Behavior

The app part worked fine before. But recently since a few days ago, the app part does not inherit the site theme color, but uses the default blue color.

Steps to Reproduce

Customized a site to a non-default theme with a non-default color. Add a custom app with the inherited theme. You can see the custom app cannot inherit the site theme color, but the default blue color.

Submission Guidelines

Thanks for your contribution! Sharing is caring.


This comment has been minimized.

jerrylu1671 commented May 4, 2018

I have check the code, and it seemed that the theme classes were not lost. I tried at my test tenant’s site collection with my APP and directed to the style link : 

Below is an example, the class ‘ms-ContentAccent1-bgColor’ is used as the background-color of the app. Then I opened the style link, and find out the class ‘ms-ContentAccent1-bgColor’, the real color is ‘#0072C6’ which is showed as the default theme blue background color.
It seemed that the theme class in style link is the problem.


This comment has been minimized.

mhardy commented May 11, 2018

Having the exact same issue. Tried a number of different things but no matter what the default blue is now the only thing returned.


This comment has been minimized.

napkatz commented Jul 3, 2018

Same issue. here :( Came up during a sales demo where we were trying to sell SharePoint Online along with our add-ins. We already needed to work around a bug in the help icon handling for the Chrome component earlier in the year. Now the colors aren't coming in right, but instead sticking to Default blue.



This comment has been minimized.

napkatz commented Aug 17, 2018

I've come up with a workaround to this issue for anyone interested. We've created a server-side class called ThemeHelper which can correctly download the SharePoint Online themes on the server-side. We can then dynamically add them to CSS files that override the incorrect colors currently provided by the ChromeControl.

Here's a link to our blog about the workaround: The ThemeHelper class can also be downloaded at this location.

Likewise, a link to our video on YouTube shwoing the workaround in action:

I hope this helps! I know SPFx gets a lot of attention, albeit if you are looking to integrate external web applications into SharePoint Online, the Add-In model is a very important tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment