Configuring Themes¶
In order to install themes, you must first make sure you have the following PowerShell modules installed: - SharePointOnlinePowerShell
To install the above module, use this PowerShell command:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Generate a theme¶
Use this utility on the web to create a theme file:
https://developer.microsoft.com/en-us/fluentui#/styles/themegenerator?fabricVer=5
Install the theme¶
When you have a desired theme, you need to copy out the "PowerShell" block and set up the command as below:
Connect-SPOService https://<TENANT>-admin.sharepoint.com
$theme = <PASTE HERE THE THEME POWERSHELL OBJECT>
Add-SPOTheme -Overwrite:$true -Palette $theme -IsInverted:$false -Identity <THEME NAME HERE>
Note
If this is a "dark" theme, you must set the -IsInverted
switch to $true
Example:¶
Connect-SPOService https://mercuryintranet-admin.sharepoint.com
$theme = @{
"themePrimary" = "#faa634";
"themeLighterAlt" = "#fffbf7";
"themeLighter" = "#fef1de";
"themeLight" = "#fde4c1";
"themeTertiary" = "#fcca85";
"themeSecondary" = "#fbb24c";
"themeDarkAlt" = "#e1972f";
"themeDark" = "#be7f28";
"themeDarker" = "#8c5e1d";
"neutralLighterAlt" = "#f8f8f8";
"neutralLighter" = "#f4f4f4";
"neutralLight" = "#eaeaea";
"neutralQuaternaryAlt" = "#dadada";
"neutralQuaternary" = "#d0d0d0";
"neutralTertiaryAlt" = "#c8c8c8";
"neutralTertiary" = "#d2d2d2";
"neutralSecondary" = "#a5a5a5";
"neutralPrimaryAlt" = "#7b7b7b";
"neutralPrimary" = "#686868";
"neutralDark" = "#4f4f4f";
"black" = "#3b3b3b";
"white" = "#ffffff";
"primaryBackground" = "#ffffff";
"primaryText" = "#686868";
"bodyBackground" = "#ffffff";
"bodyText" = "#686868";
"disabledBackground" = "#f4f4f4";
"disabledText" = "#c8c8c8";
}
Add-SPOTheme -Overwrite:$true -Palette $theme -IsInverted:$false -Identity Southway