Forum Discussion
Group Colors -- please make them more consistent... see examples in screenshot
I'm not really sure if you're talking about the color scheme of the outlook group, or the associated SharePoint teamsite, but here's how we manage both.
The outlook group's theme is set based on the group image. We make sure this is a colourful tile in the right colour (tip: metro studio). Group appearance changes, usually a little darker colour of the same palette is chosen for background/lines etc.
The group image is synchronized to the associated teamsite (this is ootb). In a provisioning scenario, you may manage the themefile of your modern teamsite using the following pnp powershell commands:
$themefile = 'path-to-your-teamfile'
Connect-PnPOnline $url -Credentials $credentials Add-PnPFile -Path $themefile -Folder SiteAssets $web = Get-PnPWeb $palette = $web.ServerRelativeUrl + "/SiteAssets/" + $themefile $web.ApplyTheme($palette, [NullString]::Value, [NullString]::Value, $false) $web.Update() # Set timeout as high as possible and execute $web.Context.RequestTimeout = [System.Threading.Timeout]::Infinite $web.Context.ExecuteQuery()
Note that only the ContentAccent1 value of your themefile dicates the appearance of the modern teamsite. Other content values only play a role in things like calendar overlays in different colours.
In regards to run this code, I tried running the same lines of code to apply theme for o365 sp team site. Everything looks great except for the last line. Update the last line of code as Execute-PnPQuery and it works.
- AnonymousJun 11, 2017
Thanks Annie Wong, that command is more stable in terms of timeout too i guess!