How to add theme colour by using sharepoint framework in sharepoint sites?

Khushi 0 Reputation points
2023-11-07T03:51:11.65+00:00

Hi,

I want to add theme colour in sharepoint online site. Can you please help to do where I have to add the code and what exactly need to add. I found this blog https://fabricweb.z5.web.core.windows.net/pr-deploy-site/refs/heads/master/theming-designer/index.html related to the add theme. So how can we use can you please help me on this.

Thanks!

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,941 Reputation points Microsoft External Staff
    2023-11-07T09:41:12.9033333+00:00

    Here are steps:

    1.Open the Fluent Theme Designer app.

    2.Modify the Primary color, Text color, and Background color values.

    3.In the upper-right corner, select Export theme to generate the PowerShell of customized theme.

    1

    4.Connect to your SharePoint tenant with PowerShell.

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

    5.Upload the customized theme in to SharePoint.

    $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";
    }
    Add-SPOTheme -Identity “MyTheme” -Palette $themepalette -IsInverted $false
    

    6.Open a site -> Click the gear icon in the top right corner -> Change the look -> Theme -> Choose the customized theme.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.