Office.ThemeId enum
Specifies the Office theme that's currently selected.
For information on Office themes, see Change the look and feel of Microsoft 365.
Remarks
Examples
// The following example sets the color of a heading based on the current Office theme.
function setHeadingColor() {
// Identify the current Office theme in use.
const currentOfficeTheme = Office.context.officeTheme.themeId;
if (currentOfficeTheme === Office.ThemeId.Colorful) {
$("h1").css("color", "#1849ff");
}
...
}
Fields
Black | The currently selected Office theme is Black. |
Colorful | The currently selected Office theme is Colorful. |
DarkGray | The currently selected Office theme is Dark Gray. |
White | The currently selected Office theme is White. |