PowerPoint.ThemeColor enum
PowerPointで使用されるテーマの色を指定します。
注釈
[ API set: PowerPointApi 1.10 ]
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/slide-management/get-set-theme-color-scheme.yaml
// Sets custom theme colors on the first slide and updates swatches if present.
await PowerPoint.run(async (context) => {
const slide = context.presentation.slides.getItemAt(0);
const colorScheme: PowerPoint.ThemeColorScheme = slide.themeColorScheme;
colorScheme.setThemeColor(PowerPoint.ThemeColor.accent1, "#C00000");
colorScheme.setThemeColor(PowerPoint.ThemeColor.accent2, "#FF6600");
colorScheme.setThemeColor(PowerPoint.ThemeColor.accent3, "#FFCC00");
colorScheme.setThemeColor(PowerPoint.ThemeColor.accent4, "#92D050");
colorScheme.setThemeColor(PowerPoint.ThemeColor.accent5, "#00B0F0");
colorScheme.setThemeColor(PowerPoint.ThemeColor.accent6, "#7030A0");
await context.sync();
await updateSwatches(context, slide);
console.log("Custom accent colors applied to slide 1.");
});
フィールド
| accent1 = "Accent1" | アクセント 1 テーマの色を指定します。 |
| accent2 = "Accent2" | アクセント 2 テーマの色を指定します。 |
| accent3 = "Accent3" | アクセント 3 テーマの色を指定します。 |
| accent4 = "Accent4" | アクセント 4 テーマの色を指定します。 |
| accent5 = "Accent5" | アクセント 5 テーマの色を指定します。 |
| accent6 = "Accent6" | アクセント 6 テーマの色を指定します。 |
| dark1 = "Dark1" | 濃色 1 テーマの色を指定します。 |
| dark2 = "Dark2" | 濃色 2 テーマの色を指定します。 |
| followedHyperlink = "FollowedHyperlink" | クリックしたハイパーリンク テーマの色を指定します。 |
| hyperlink = "Hyperlink" | ハイパーリンクテーマの色を指定します。 |
| light1 = "Light1" | 淡色 1 テーマの色を指定します。 |
| light2 = "Light2" | 淡色 2 テーマの色を指定します。 |
| mixed = "Mixed" | 混合テーマの色を指定します。 |
| none = "None" | テーマの色を指定しません。 |