Class Color

  • The Color class represents an opaque color.

  • The asRgbColor() method converts the color to an RgbColor.

  • The asThemeColor() method converts the color to a ThemeColor.

  • The getColorType() method gets the type of the color.

Color

An opaque color

Methods

MethodReturn typeBrief description
asRgbColor() RgbColor Converts this color to an RgbColor .
asThemeColor() ThemeColor Converts this color to a ThemeColor .
getColorType() ColorType Get 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 — The color type.

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

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年12月02日 UTC.