Share via

Error deploying new Sharepoint theme

Anonymous
2021-12-02T09:13:09.443+00:00

I'm trying to create a new theme for a Sharepoint site. Entered this:

$palette = @{
>> "themePrimary" = "#00a2d1";

>> "themeLighterAlt" = "#f3fbfd";

>> "themeLighter" = "#d0eff8";

>> "themeLight" = "#a9e2f1";

>> "themeTertiary" = "#5bc6e3";

>> "themeSecondary" = "#1aaed7";

>> "themeDarkAlt" = "#0093bc";

>> "themeDark" = "#007c9f";

>> "themeDarker" = "#005c75";

>> "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 "Theme name" -Palette $themepallette -IsInverted $false

But got this error:
Add-SPOTheme : Cannot bind argument to parameter 'Palette' because it is null.
At line:25 char:45

  • Add-SPOTheme -Name "Arcane Tinmen" -Palette $themepallette -IsInverte ...
  • ~~~~~~~~~~~~~~
  • CategoryInfo : InvalidData: (:) [Add-SPOTheme], ParameterBindingValidationException
  • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Online.SharePoint.PowerShell.Ad
    dSPOTheme

What's wrong?

Microsoft 365 and Office | SharePoint | For business | Windows

Answer accepted by question author

CaseyYang-MSFT 10,466 Reputation points
2021-12-03T03:10:48.377+00:00

Hi @Anonymous ,

You should use $themepalette = @{ } instead of $palette = @{ }.

For example:

$themepalette = @{  
"themePrimary" = "#00a2d1";  
"themeLighterAlt" = "#f3fbfd";  
"themeLighter" = "#d0eff8";  
"themeLight" = "#a9e2f1";  
"themeTertiary" = "#5bc6e3";  
"themeSecondary" = "#1aaed7";  
"themeDarkAlt" = "#0093bc";  
"themeDark" = "#007c9f";  
"themeDarker" = "#005c75";  
"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 "Theme name" -Palette $themepallette -IsInverted $false  

For Reference: Add-SPOTheme


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.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

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.