Class ThemeColor

  • ThemeColor represents a theme color within Google Apps Script and provides methods for interacting with it.

  • It offers two methods: getColorType() to determine the color's type (e.g., RGB, HEX) and getThemeColorType() to identify its specific theme color type (e.g., ACCENT1, TEXT1).

  • Both methods require authorization with scopes such as https://www.googleapis.com/auth/spreadsheets.currentonly or https://www.googleapis.com/auth/spreadsheets before use.

ThemeColor

A representation for a theme color.

Methods

MethodReturn typeBrief description
getColorType() ColorType Get the type of this color.
getThemeColorType() ThemeColorType Gets the theme color type of this color.

Detailed documentation

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/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getThemeColorType()

Gets the theme color type of this color.

Return

ThemeColorType — The theme color type.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

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.