- 07 February 2024
- SharePoint (4)
-
Use the Fluent UI Theme Designer (also recommended by Microsoft) to create your colour palette.
-
Once done, click on export theme > PowerShell. Copy and paste the code to notepad or similar, but add $themepalette = in front of it (we’ll need this in the PowerShell terminal shortly).
Example:
$themepalette =@{ "themePrimary" = "#0078d4"; "themeLighterAlt" = "#eff6fc"; "themeLighter" = "#deecf9"; "themeLight" = "#c7e0f4"; "themeTertiary" = "#71afe5"; "themeSecondary" = "#2b88d8"; "themeDarkAlt" = "#106ebe"; "themeDark" = "#005a9e"; "themeDarker" = "#004578"; "neutralLighterAlt" = "#faf9f8"; "neutralLighter" = "#f3f2f1"; "neutralLight" = "#edebe9"; "neutralQuaternaryAlt" = "#e1dfdd"; "neutralQuaternary" = "#d0d0d0"; "neutralTertiaryAlt" = "#c8c6c4"; "neutralTertiary" = "#a19f9d"; "neutralSecondary" = "#605e5c"; "neutralPrimaryAlt" = "#3b3a39"; "neutralPrimary" = "#323130"; "neutralDark" = "#201f1e"; "black" = "#000000"; "white" = "#ffffff"; }
-
Follow the link to download and install SharePoint Online Management Shell from the official Microsoft website.
-
Run SharePoint Online Management Shell to open the terminal and paste in the following command: Connect-SPOService -Url https://myadmindomain.sharepoint.com (where myadmindomain is your SharePoint domain name).
Connect-SPOService -Url https://myadmindomain.sharepoint.com
-
You’ll then get a login prompt from Microsoft, go ahead and login with an admin account for SharePoint.
-
Next, paste the PowerShell code we generated earlier (including the ‘$themepalette =’ prefix) and press enter.
-
Now paste Add-SPOTheme -Identity “name of your theme” -Palette $themepalette -IsInverted $false, where “name of your theme” is what you what want to call your theme (this is how it will be labelled in SharePoint), and press enter.
Add-SPOTheme -Identity "name of your theme" -Palette $themepalette -IsInverted $false
-
To test your new theme, simply visit one of your SharePoint sites and go to the theme settings (Gear Icon > Change the look > Theme), where you should now see your new theme listed amongst the default SharePoint themes.
You can also remove a theme via the terminal by using the following command (used after you’ve connected), where “name of your theme” is the name of the theme you wish to delete:
Remove-SPOTheme -Identity "name of your theme"
Comments
Whether you have feedback, a question, want to share your opinion, or simply want to say thank you - we welcome comments! Please read the disclaimer.