SharePoint Online: How to Add New Custom Theme using PowerShell?

Requirement: Create New Theme in SharePoint Online

How to create new color theme in SharePoint Online?
SharePoint Online Modern sites (Teams, Communications and Hub sites) provides set of default themes (Blue, Orange, Red, Purple, Green and Gray), which you can use to quickly change the look and feel or appearance of your SharePoint Online sites. In addition, you can create new theme for a more customized experience for your users.

Here are the steps to add theme in SharePoint Online:

Step 1: create new color theme in SharePoint Online
Create new theme in SharePoint Online using this theme designer: https://developer.microsoft.com/en-us/fabric#/styles/themegenerator, Customize and Copy the theme output.

Step 2: Add Custom Theme to SharePoint Online using PowerShell
Once the theme is created using theme designer, add the theme color to SharePoint Online using PowerShell. Open SharePoint Online Management Shell, run this script:
#Define the color palette
$ThemePallette = @{
"themePrimary" = "#00d492";
"themeLighterAlt" = "#f3fdfa";
"themeLighter" = "#d0f8eb";
"themeLight" = "#a9f2db";
"themeTertiary" = "#5ce5b9";
"themeSecondary" = "#1ad99c";
"themeDarkAlt" = "#00be82";
"themeDark" = "#00a16e";
"themeDarker" = "#007751";
"neutralLighterAlt" = "#f8f8f8";
"neutralLighter" = "#f4f4f4";
"neutralLight" = "#eaeaea";
"neutralQuaternaryAlt" = "#dadada";
"neutralQuaternary" = "#d0d0d0";
"neutralTertiaryAlt" = "#c8c8c8";
"neutralTertiary" = "#ae9e9e";
"neutralSecondary" = "#938181";
"neutralPrimaryAlt" = "#796767";
"neutralPrimary" = "#0f0b0b";
"neutralDark" = "#443636";
"black" = "#2a2020";
"white" = "#ffffff";
}

#Set Admin Center URL
$AdminCenterURL = "https://crescent-admin.sharepoint.com/"

#Connect to SharePoint Online
Connect-SPOService -url $AdminCenterURL -Credential (Get-Credential)

#Add new SharePoint Online theme
Add-SPOTheme -Name "Crescent Green" -Palette $ThemePalette -IsInverted $False

So now, when you go to Settings gear >> Change the Look, You'll find the new color theme listed under "Company Themes"!

sharepoint online create new theme
SharePoint Online: How to Add New Custom Theme using PowerShell? SharePoint Online: How to Add New Custom Theme using PowerShell? Reviewed by Salaudeen Rajack on November 25, 2017 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.