How can we help you today?

Known Issue: Theme Colors Revert to Default SharePoint Colors on Modern Sites

This article is deprecatedThe issue was fixed in the 7.1.5.xx ShortPoint version.

Please proceed with the upgrade:

  1. Download the latest ShortPoint version: 
  2. Follow the upgrade steps here: Tutorial: How to Upgrade to ShortPoint SPFx 7.1.5.xx Version (New Upgrade)?

Issue


You have noticed that some colors on your Modern Communication and Teams site pages revert to the default SharePoint theme color:



Colors from Theme Builder Color Palette:


Refreshing the page sometimes fixes the issue.


Reason


Due to recent update from Microsoft side, SharePoint is now applying the default out-of-the-box color theme on some Communication and Teams sites instead of theme colors selected by user.


Workaround


You may fix this issue and bring the colors back by adding custom JavaScript code in Theme Builder.


Important: The following workaround will not fix the colors on the system pages (e.g., Site contents, Site pages, Documents etc.). We are planning to fix this issue in our upcoming release.

Step 1. Open Custom JavaScript section in ShortPoint Theme Builder


Open Theme Builder (Site contents > ShortPoint Dashboard > Theme Builder > Customize my site).


Navigate to Utilities Custom JavaScript:



Step 2: Add the fix code


Add the following code in the text box:


(function() {
shortpoint.core.util.spfx.getAppliedTheme().then(function(response) {
var themeData = JSON.parse(response.d.GetContextWebThemeData);
var theming = shortpoint.branding.util.spfx.theming;
var theme = theming.convertOldThemeStructureToSpfx(themeData);
theming.spfxHelpers.loadTheme(theme);
});
}())



Press Apply and Publish. 



That's it, the colors should now be the ones as you have in your chosen theme.



Note: if the changes do not reflect immediately, try re-entering the theme colors (Theme Builder > Branding > Color Palette) and publishing them again.



Related articles:

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

World's best intranet sites are designed using ShortPoint

Get started today! Learn more
See all 53 topics

Start a trial

Ignite your vision. Install ShortPoint directly on your site, or play in sandbox mode. No credit card required.

Get started today

World’s best intranet sites are designed using ShortPoint

Thousands of companies using ShortPoint everyday to design, brand and build award winning intranet sites.

Get started Learn more