PowerPoint.ThemeColorScheme class
Represents a theme color scheme.
- Extends
Remarks
Properties
| context | The request context associated with the object. This connects the add-in's process to the Office host application's process. |
Methods
| get |
Gets the color value for the specified |
| get |
Gets the color value for the specified |
| set |
Sets the color value for the specified |
| set |
Sets the color value for the specified |
| toJSON() | Overrides the JavaScript |
Property Details
context
The request context associated with the object. This connects the add-in's process to the Office host application's process.
context: RequestContext;
Property Value
Method Details
getThemeColor(color)
Gets the color value for the specified ThemeColor.
getThemeColor(color: PowerPoint.ThemeColor): OfficeExtension.ClientResult<string>;
Parameters
- color
- PowerPoint.ThemeColor
The theme color.
Returns
OfficeExtension.ClientResult<string>
The color value in #RRGGBB format (e.g., "FFA500").
Remarks
getThemeColor(color)
Gets the color value for the specified ThemeColor.
getThemeColor(color: "Mixed" | "None" | "Accent1" | "Accent2" | "Accent3" | "Accent4" | "Accent5" | "Accent6" | "Dark1" | "Dark2" | "FollowedHyperlink" | "Hyperlink" | "Light1" | "Light2"): OfficeExtension.ClientResult<string>;
Parameters
- color
-
"Mixed" | "None" | "Accent1" | "Accent2" | "Accent3" | "Accent4" | "Accent5" | "Accent6" | "Dark1" | "Dark2" | "FollowedHyperlink" | "Hyperlink" | "Light1" | "Light2"
The theme color.
Returns
OfficeExtension.ClientResult<string>
The color value in #RRGGBB format (e.g., "FFA500").
Remarks
setThemeColor(color, rgbColor)
Sets the color value for the specified ThemeColor.
setThemeColor(color: PowerPoint.ThemeColor, rgbColor: string): void;
Parameters
- color
- PowerPoint.ThemeColor
The theme color.
- rgbColor
-
string
The color value in #RRGGBB format (e.g., "FFA500") or as a named HTML color (e.g., "orange").
Returns
void
Remarks
setThemeColor(color, rgbColor)
Sets the color value for the specified ThemeColor.
setThemeColor(color: "Mixed" | "None" | "Accent1" | "Accent2" | "Accent3" | "Accent4" | "Accent5" | "Accent6" | "Dark1" | "Dark2" | "FollowedHyperlink" | "Hyperlink" | "Light1" | "Light2", rgbColor: string): void;
Parameters
- color
-
"Mixed" | "None" | "Accent1" | "Accent2" | "Accent3" | "Accent4" | "Accent5" | "Accent6" | "Dark1" | "Dark2" | "FollowedHyperlink" | "Hyperlink" | "Light1" | "Light2"
The theme color.
- rgbColor
-
string
The color value in #RRGGBB format (e.g., "FFA500") or as a named HTML color (e.g., "orange").
Returns
void
Remarks
toJSON()
Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that's passed to it.) Whereas the original PowerPoint.ThemeColorScheme object is an API object, the toJSON method returns a plain JavaScript object (typed as PowerPoint.Interfaces.ThemeColorSchemeData) that contains shallow copies of any loaded child properties from the original object.
toJSON(): {
[key: string]: string;
};
Returns
{ [key: string]: string; }