How to Add Custom Branding in SP Online Sites Using Powershell

Vikram Samal
2 min readSep 14, 2021

Your intranet homepage is the place where people in your organization can get informed, get inspired, and discover news and resources so branding them according to your company’s need is really important.

Adding custom theme so that it matches your Corporate Color Theme.

To start you need two tools SharePoint Online Management Shell: https://www.microsoft.com/en-us/download/details.aspx?id=35588

Secondly theme builder:

https://fluentuipr.z22.web.core.windows.net/heads/master/theming-designer/index.html

Then use the Theme builder to define your Corporate Theme color and then copy the Powershell code for the same. Something like this. Finally apply that to your site.

$themepaletteblk = @{
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 “CorpBlack” -Palette $themepaletteblk -IsInverted $false -Overwrite

Once Done your theme pallet you should see the option appearing as CorpBlack

If you want to update an existing theme (to modify some of its color settings, for example), use the same syntax as shown previously, but add the -Overwrite flag to the Add-SPOTheme cmdlet

Add-SPOTheme -Identity "CorpBlack" -Palette $themepalette -IsInverted $false -Overwrite

Cheers!

--

--

Vikram Samal

A seasoned Solution Architect with a profound passion for artificial intelligence (AI) and its transformative potential across industries.