Office.ThemeId enum

現在選択されている Office テーマを指定します。

Office のテーマの詳細については、「Microsoft 365 の外観を変更する」を参照してください。

注釈

// 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");
    }

    ...
}

フィールド

Black

現在選択されている Office テーマは です。

Colorful

現在選択されている Office テーマは カラフルです

DarkGray

現在選択されている Office テーマは 濃い灰色です

White

現在選択されている Office テーマは White です