Class Color

Color

An opaque color

Methods

MethodReturn typeBrief description
asRgbColor()RgbColorConverts this color to an RgbColor.
asThemeColor()ThemeColorConverts this color to a ThemeColor.
getColorType()ColorTypeGet the type of this color.

Detailed documentation

asRgbColor()

Converts this color to an RgbColor.

Return

RgbColor

Throws

Error — if the color is not an RgbColor

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 ThemeColor.

Return

ThemeColor

Throws

Error — if the color is not a ThemeColor

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

getColorType()

Get the type of this color.

Return

ColorType

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

发送以下问题的反馈:

此网页
Apps Script
Apps Script
需要帮助?请访问我们的支持页面