PowerPoint.ThemeColorScheme class
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
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
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
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)
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
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)
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
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)
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
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)
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
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()
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
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; }