How to change SharePoint Online Modern Site Theme (Create a custom theme)

In this SharePoint tutorial, we will check how to change SharePoint Online Modern Site Theme. Also, we will see how to create a new theme for SharePoint Online modern site, default SharePoint themes.

[toc]

Also, we will check What is the SharePoint modern site logo size, how to change the modern SharePoint site logo, change the SharePoint site background color.

We will also see how to use the SharePoint online theme generator to create a new theme for modern SharePoint Online sites.

This blog will focus on how to change the theme in SharePoint Online Office 365, if you want to change theme in SharePoint 2013/2016 or SharePoint 2019, then you can check How to change site logo in SharePoint 2016/2013/Online.

What is SharePoint theming

SharePoint Theme gives an easy way to change the look and feel of the site. By using a theme, you can easily change the look and feel and professional style of your SharePoint site like logo, color, background color, etc.

There are some predefined collections of web page elements such as font, color schemes, layout, and background pictures. SharePoint theme can be change any number of times.

The theme is only applied to the selected SharePoint Online site.

SharePoint Owners have few new options to define and manage the site collections for applying the custom style and colors.

SharePoint Site Theme features:-

  • SharePoint theme has the ability to define the custom themes and make them available to the site owners of SharePoint.
  • In the JSON schema, themes are defined and they have color settings and related metadata for each and every theme in SharePoint.
  • In SharePoint for defining a new custom theme, we can use the Online theme Generator Tool.
  • There are six light themes and two dark themes that are presently available as a set of default themes in SharePoint.
  • Six dark colors and twelve light colors, as well as 16 supplementary themes, are in an updated palette.

Default SharePoint Online themes

In SharePoint Online modern site, there are some predefined themes available by default:-

  • Blue
  • Orange
  • Red
  • Purple
  • Gray
  • Green
  • Dark Yellow (inverted theme)
  • Dark Blue(inverted theme)

In SharePoint, these themes are designed for readability and find them to be useful starting points for creating custom themes.

In SharePoint Online you can use the default themes or customize the themes as needed.

Some Default Supplementary themes are:-

  • Light themes:- Gold, Teal, Dark Blue, Indigo, Plum, Warm Gray
  • Dark themes:-Red, Green, Purple, Gray
How to change SharePoint Online Modern Site Theme

Change SharePoint Modern Site theme

Now, we will see how to change modern SharePoint site theme.

Open the SharePoint Online modern site, click on the settings icon, and then click on Change the look.

Change SharePoint Modern Site theme

Then in the next screen click on Themes.

What is SharePoint theming

Now, there is all the SharePoint themes are available you can select the theme and click on Save, it will apply the theme.

Default SharePoint Online themes

Customize SharePoint Online Theme

We can easily customize a SharePoint Online modern SharePoint theme.

To Customize the color of SharePoint Site select any default theme then click on Customize.

Customize SharePoint Online Theme

Then you can change the Main color and Accent color then click on Save to save the changes.

How to Customize SharePoint Online Theme

Change Header Layout in SharePoint Site

Open SharePoint site then Go to Settings icon, then click on Change the look then click on the Header.

Select either the Standard layout or the Compact layout for the site. Compact Header Layout moves all the content of the site in a single line.

Change Header Layout in SharePoint Site

SharePoint modern site logo size

SharePoint logo size is 64px x 64px. The SharePoint logo Canvas size should be 64 pixels in height and the width should be 175 pixels in width.

Now, we will see how to change the SharePoint Online modern site logo.

Open the SharePoint Online modern site. Then click on Settings > Change the look > Header > then in Site logo and Click on Change.

SharePoint modern site logo size

Then it will ask you to upload the logo from your local system.

SharePoint modern site logo size

Now, SharePoint Online modern site logo is changed like below:

Change SharePoint Modern Site theme

This is how we can change the modern SharePoint site logo.

Also, we can change the logo from Site Information Menu. Open the Site, click on settings -> Site information and then you can change the logo.

Change modern SharePoint site background-color

Now, we will see how to change modern SharePoint site background-color.

Open SharePoint Online site, Go to Settings then click on Change the look then click on Header.

Select Background to change the background color of the SharePoint site. Click on the Save button to apply the changes.

Change modern SharePoint site background-color

Create a custom theme in SharePoint online using SharePoint online theme generator

SharePoint includes preinstalled themes but if you want to create Custom themes then you have to create color palettes and font schemes and upload them to the Theme Gallery.

We can create a custom theme in SharePoint Online modern site by using the SharePoint Online theme generator.

Open SharePoint Online theme generator tool.

Here, to create a new custom theme, Select the Primary color, Text color, and Background color and then click on an Export theme.

Create a custom theme in SharePoint online

From Export theme option copy the PowerShell code and then open Windows PowerShell ISE and paste the code in Windows PowerShell ISE.

SharePoint online theme generator

Note: You need to install SharePoint Online management shell.

Below is my new theme code:

$palette = @{
"themePrimary" = "#0e795b";
"themeLighterAlt" = "#f1faf7";
"themeLighter" = "#c9e9e0";
"themeLight" = "#9ed6c6";
"themeTertiary" = "#52ae94";
"themeSecondary" = "#1f886a";
"themeDarkAlt" = "#0d6c51";
"themeDark" = "#0b5b44";
"themeDarker" = "#084332";
"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";
}

The full PowerShell code is the below:

Connect-SPOService -Url https://tsinfo-admin.sharepoint.com/ -credential Bijay@tsinfo.onmicrosoft.com

$themeName = "TSINFO"

#Replace the palette variable value with the generated code
$palette = @{
"themePrimary" = "#0e795b";
"themeLighterAlt" = "#f1faf7";
"themeLighter" = "#c9e9e0";
"themeLight" = "#9ed6c6";
"themeTertiary" = "#52ae94";
"themeSecondary" = "#1f886a";
"themeDarkAlt" = "#0d6c51";
"themeDark" = "#0b5b44";
"themeDarker" = "#084332";
"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";
}
Add-SPOTheme -Name $themeName -Palette $palette -IsInverted:$false -Overwrite

Once the PowerShell cmdlets executed successfully, you can check the theme in the SharePoint Online modern site.

Click on Settings icon -> Change the look -> Themes.

how to create a custom theme in sharepoint

Remove SharePoint Online Modern theme

Anytime, if you want, you can remove a SharePoint Online Modern theme using PowerShell.

Here, we will remove the custom theme that we created in the above steps:

Remove SharePoint Online Modern theme

Run the below PowerShell cmdlet. You can use PowerShell ISE to remove the modern SharePoint Online theme.

Connect-SPOService -Url https://tsinfo-admin.sharepoint.com/ -credential Bijay@tsinfo.onmicrosoft.com
$themeName = "TSINFO"
Remove-SPOTheme $themeName

Once the command executed successfully, the theme will be removed from the SharePoint Online modern site.

Remove SharePoint Online Modern theme using powershell

Get all SharePoint Online modern themes

Now, we will see how to get all the SharePoint Online modern themes using PowerShell.

Run the PowerShell command to retrieve all SharePoint Online modern themes in SharePoint Online.

Connect-SPOService -Url https://tsinfo-admin.sharepoint.com/ -credential Bijay@tsinfo.onmicrosoft.com
Get-SPOTheme

Or

Connect-SPOService -Url https://tsinfo-admin.sharepoint.com/ -credential Bijay@tsinfo.onmicrosoft.com
$themes = Get-SPOTheme
foreach ($theme in $themes) {
    $theme.Name
}

You may like following SharePoint Online tutorials:

Here, in this tutorial, we learned

  • How to change SharePoint Online Modern Site Theme
  • What is SharePoint theming
  • Default SharePoint Online themes
  • Change SharePoint Modern Site theme
  • Customize SharePoint Online Theme
  • Change Header Layout in SharePoint Site
  • SharePoint modern site logo size
  • Change SharePoint Online Modern Site Logo
  • Change modern SharePoint site background-color
  • Create a custom theme in SharePoint online using SharePoint online theme generator
  • Remove SharePoint Online Modern theme
  • Get all SharePoint Online modern themes
  • Bijay,
    Can we deploy theme to particular site collection instead of whole tenant. If so what is the command to connect to site collection.

    Thank you

  • >