Skip to content

Commit 9fe1baf

Browse files
committed
update new theme colors
1 parent 7264b9b commit 9fe1baf

File tree

1 file changed

+78
-30
lines changed
  • sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell

1 file changed

+78
-30
lines changed

sharepoint/sharepoint-ps/Microsoft.Online.SharePoint.PowerShell/Add-SPOTheme.md

Lines changed: 78 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ Creates a new custom theme, or overwrites an existing theme to modify its settin
1818

1919
## SYNTAX
2020

21-
### LegacyThemeSet
21+
### NewThemeSet
2222
```
2323
Add-SPOTheme
2424
[-Identity] <SpoThemePipeBind>
25-
-Palette <SpoThemePalettePipeBind>
26-
-IsInverted <Boolean>
25+
-ColorPairs <SpoThemeColorPairPipeBind>
2726
[-Overwrite]
2827
[<CommonParameters>]
2928
```
3029

31-
### NewThemeSet
30+
### LegacyThemeSet
3231
```
3332
Add-SPOTheme
3433
[-Identity] <SpoThemePipeBind>
35-
-ColorPairs <SpoThemeColorPairPipeBind>
34+
-Palette <SpoThemePalettePipeBind>
35+
-IsInverted <Boolean>
3636
[-Overwrite]
3737
[<CommonParameters>]
3838
```
@@ -47,7 +47,78 @@ You can choose which parameter set to use depending on the legacy or new theme f
4747

4848
## Examples
4949

50-
### Example 1: Add a legacy format theme
50+
### Example 1: Add a new format theme
51+
```powershell
52+
$colorPairs = @{
53+
light = @(
54+
@{
55+
accentColor = '#03787C'
56+
backgroundColor = '#ffffff'
57+
},
58+
@{
59+
accentColor = '#ffffff'
60+
backgroundColor = '#03787C'
61+
},
62+
@{
63+
accentColor = '#E3FFFD'
64+
backgroundColor = '#03787C'
65+
},
66+
@{
67+
accentColor = '#03787C'
68+
backgroundColor = '#E3FFFD'
69+
},
70+
@{
71+
accentColor = '#FFF9E3'
72+
backgroundColor = '#03787C'
73+
},
74+
@{
75+
accentColor = '#03787C'
76+
backgroundColor = '#FFF9E3'
77+
},
78+
@{
79+
accentColor = '#03787C'
80+
backgroundColor = '#F5F5F5'
81+
},
82+
@{
83+
accentColor = '#242424'
84+
backgroundColor = '#F5F5F5'
85+
},
86+
@{
87+
accentColor = '#155473'
88+
backgroundColor = '#ffffff'
89+
},
90+
@{
91+
accentColor = '#ffffff'
92+
backgroundColor = '#155473'
93+
},
94+
@{
95+
accentColor = '#155473'
96+
backgroundColor = '#E3FFFD'
97+
},
98+
@{
99+
accentColor = '#E3FFFD'
100+
backgroundColor = '#155473'
101+
},
102+
@{
103+
accentColor = '#FFF9E3'
104+
backgroundColor = '#155473'
105+
},
106+
@{
107+
accentColor = '#155473'
108+
backgroundColor = '#FFF9E3'
109+
}
110+
)
111+
}
112+
113+
Add-SPOTheme -Identity "Teal Theme" -ColorPairs $colorPairs
114+
```
115+
116+
### Example 2: Overwrite a new format theme
117+
```powershell
118+
Add-SPOTheme -Identity "Teal Theme" -ColorPairs $colorPairs -Overwrite
119+
```
120+
121+
### Example 3: Add a legacy format theme
51122
In this example, a theme named `"Custom Cyan"` is created, with color palette settings that are various shades of cyan. Note that the settings are passed as a hash table.
52123

53124
```powershell
@@ -85,37 +156,14 @@ Add-SPOTheme -Identity "Custom Cyan" -Palette $themepalette -IsInverted $false
85156
> [!NOTE]
86157
> Prior to the December 2017 release of the SPO Management Shell, the **Add-SPOTheme** cmdlet required that color palette settings be passed as a dictionary. We recommend that you use the latest version of the SPO Management Shell, or use the `HashToDictionary` function to convert a hash table to a dictionary if needed.
87158
88-
### Example 2: Overwrite a legacy format theme
159+
### Example 4: Overwrite a legacy format theme
89160

90161
If you want to update an existing legacy format 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.
91162

92163
```powershell
93164
Add-SPOTheme -Identity "Custom Cyan" -Palette $themepalette -IsInverted $false -Overwrite
94165
```
95166

96-
### Example 3: Add a new format theme
97-
```powershell
98-
$colorPairs = @{
99-
light = @(
100-
@{
101-
accentColor = '#00ffff'
102-
backgroundColor = '#fff'
103-
},
104-
@{
105-
accentColor = '#fff'
106-
backgroundColor = '#00ffff'
107-
}
108-
)
109-
}
110-
111-
Add-SPOTheme -Identity "Custom Cyan" -ColorPairs $colorPairs
112-
```
113-
114-
### Example 4: Overwrite a new format theme
115-
```powershell
116-
Add-SPOTheme -Identity "Custom Cyan" -ColorPairs $colorPairs -Overwrite
117-
```
118-
119167
## PARAMETERS
120168

121169
### -Identity

0 commit comments

Comments
 (0)