Create and Deploy a Custom Theme for SharePoint Modern Site

Create and Deploy a Custom Theme for SharePoint Modern Site

Last Updated on August 26, 2023

You feel limited by the number of default themes that SharePoint offers. Yes, they may be attractive (built-in) themes, but that’s all there is to it. You’re stuck with what’s available to you.

Fortunately, you can now create your own custom theme with the help of the theme generator tool and install it on your site.

The question now is, how do you use the tool? What to do then? How do you deploy that new custom theme that you built using the theme generator?

In this article, you will learn the answers to those questions above in a step-by-step manner. You will learn how to use PowerShell to install a custom theme into your own SharePoint modern site.

Let’s start!

How to Create a SharePoint Theme With the Theme Generator Tool

First off, visit the Fluent UI Theme Designer.

Note that what you’ll be visiting is the theme designer itself. To edit individual elements like the typography, layout, and elevation, you can get their codes from Fluent UI’s “Styles” and “Controls” pages.

As for the Fluent UI Theme Designer, you can use it to decide the theme’s primary color, text color, and background color. Simply click on the color boxes or enter the hex code of your preferred colors.

Fluent UI Theme Designer

The right portion of the designer will show you how the colors look together in real time with the colors you selected. The accessibility checker below will inform you of any accessibility issues and provide you with guidance on what to do.

Once you’re satisfied with how your design looks, click on the “Export theme” button at the upper-right button of the page:

How to export the theme from the Fluent UI Theme Designer

You will then see a right-hand pane open up which contains the codes you need to install the custom theme to your site.

Go to the PowerShell section. You will need the codes in the next section.

Make sure to copy the code for PowerShell

There are two choices here — you can copy the codes in a notepad or you can leave the tab open and copy the codes directly from the page.

Sign up for exclusive updates, tips, and strategies

    How to Use PowerShell to Install a Custom Theme

    Unfortunately, there’s no way around using PowerShell as of the time of writing this post. The good news is, you don’t need technical know-how for this. All you need to do is copy and paste the codes below.

    Before you proceed, make sure that you have the latest version of SharePoint Online Management Shell.

    If not, download a copy from Microsoft and install it on your system.

    Download a copy from Microsoft

    Once you have it installed, open SharePoint Online Management Shell and connect to your SharePoint admin site.

    Enter the following command in the prompt (but change the “domain” part):

    Connect-SPOService -Url https://domain-admin.sharepoint.com

    The domain is your SharePoint domain name. If the domain name is “mrsharepoint”, then it will be https://mrsharepoint-admin.sharepoint.com as shown below:

    How to download SharePoint Online Management Shell

    After pressing “Enter” on your keyboard, you will then be prompted to log in. Make sure to use your credentials with SharePoint admin access.

    Once you’re logged in, enter the command below and paste the PowerShell code from the notepad (or page of the custom theme).

    $themepalette =

    Here is an example of how it looks in the command prompt:

    Paste the PowerShell code into SharePoint Online Management Shell

    Hit “Enter” on your keyboard after pasting the code.

    Don’t close the PowerShell yet! There’s still a line of code you need to enter.

    Paste the code below (but don’t forget to enter your preferred theme name enclosed within double quotes) and press “Enter” on your keyboard:

    Add-SPOTheme -Identity “themename” -Palette $themepalette -IsInverted $false

    Note that end users can see the theme name so make sure you use a theme name that your team members will understand.

    Name the new custom theme so others may identify it.

    If you want to make a change to the current custom theme and overwrite it, simply add the “-overwrite” flag to the code above as shown below:

    Add-SPOTheme -Identity “themename” -Palette $themepalette -IsInverted $false -overwrite

    Select the New Theme on the SharePoint Site

    After installing the new custom theme, you will have to manually select it from your site settings.

    Click the gear icon at the upper-right of the screen and click “Change the look”.

    How to change the look of a SharePoint site

    Go to the “Theme” selection and you will then see all the available themes, including the one you recently installed.

    Select the new custom theme and click the “Save” button below the pane.

    How to change the theme of a SharePoint site

    That’s it! You have now successfully created a new custom theme, installed it on your SharePoint site, and selected it as the new theme.

    Other users of the site will see the same available themes. That’s why it’s important to name the new theme properly.

    If you have more questions regarding creating and deploying a custom theme for your SharePoint modern site, comment them down below and I’ll get to them as soon as possible. You can also send me a private message on my contact page.

    About Ryan Clark

    As the Modern Workplace Architect at Mr. SharePoint, I help companies of all sizes better leverage Modern Workplace and Digital Process Automation investments. I am also a Microsoft Most Valued Professional (MVP) for M365 Apps & Services.

    Subscribe
    Notify of
    guest
    1 Comment
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments

    Laura
    Laura
    8 months ago

    Hi. This was great! Can you provide the code to remove a custom theme?

    1
    0
    Would love your thoughts, please comment.x
    ()
    x
    Scroll to Top