Skip to content

Bug report: Error on 'spo theme set' with JSON. Theme works in SPO powershell. #1631

@alexabramkin

Description

@alexabramkin

Description

Running
spo theme set --verbose -n XYZ-Green -p C:...\theme.json

Error
File contents is not a valid theme

Steps to reproduce

Create theme in theme designer, save json in a file

Expected result

New XYZ-Green theme in tenancy

Actual result

Error
File contents is not a valid theme

Environment

Windows Server 16

o365 version 2.10.0

theme.json below:
{
"themePrimary": "rgba(46, 135, 46, 0.733)",
"themeLighterAlt": "rgba(244, 250, 244, 0.733)",
"themeLighter": "rgba(211, 236, 211, 0.733)",
"themeLight": "rgba(176, 219, 176, 0.733)",
"themeTertiary": "rgba(111, 183, 111, 0.733)",
"themeSecondary": "rgba(63, 150, 63, 0.733)",
"themeDarkAlt": "rgba(41, 122, 41, 0.733)",
"themeDark": "rgba(35, 103, 35, 0.733)",
"themeDarker": "rgba(26, 76, 26, 0.733)",
"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"
}

PLEASE NOTE:
SPO PowerShell below works:

$themepalette = @{
"themePrimary" = "#2e872e49.4ccccccccccc";
"themeLighterAlt" = "#f4faf449.4ccccccccccc";
"themeLighter" = "#d3ecd349.4ccccccccccc";
"themeLight" = "#b0dbb049.4ccccccccccc";
"themeTertiary" = "#6fb76f49.4ccccccccccc";
"themeSecondary" = "#3f963f49.4ccccccccccc";
"themeDarkAlt" = "#297a2949.4ccccccccccc";
"themeDark" = "#23672349.4ccccccccccc";
"themeDarker" = "#1a4c1a49.4ccccccccccc";
"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 "XYZ-Green" -Palette $themepalette -IsInverted $false

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions