AI-generated Key Takeaways
-
This documentation describes how to work with opaque colors in Google Apps Script's Slides service.
-
Color
objects can be converted to RGB or Theme colors using theasRgbColor()
andasThemeColor()
methods. -
getColorType()
allows you to retrieve the specific type of a given color. -
Using any of these methods requires authorization with the
presentations.currentonly
orpresentations
scopes.
An opaque color
Methods
Method | Return type | Brief description |
---|---|---|
as | Rgb | Converts this color to an Rgb . |
as | Theme | Converts this color to a Theme . |
get | Color | Get the type of this color. |
Detailed documentation
asRgbColor()
Converts this color to an Rgb
.
Return
Throws
Error
— if the color is not an Rgb
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
asThemeColor()
Converts this color to a Theme
.
Return
Throws
Error
— if the color is not a Theme
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations