Class ThemeColor
Stay organized with collections
Save and categorize content based on your preferences.
ThemeColor
A representation for a theme 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.
[null,null,["Last updated 2024-12-02 UTC."],[[["\u003cp\u003e\u003ccode\u003eThemeColor\u003c/code\u003e represents a theme color within Google Apps Script and provides methods for interacting with it.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two methods: \u003ccode\u003egetColorType()\u003c/code\u003e to determine the color's type (e.g., RGB, HEX) and \u003ccode\u003egetThemeColorType()\u003c/code\u003e to identify its specific theme color type (e.g., ACCENT1, TEXT1).\u003c/p\u003e\n"],["\u003cp\u003eBoth methods require authorization with scopes such as \u003ccode\u003ehttps://www.googleapis.com/auth/spreadsheets.currentonly\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/spreadsheets\u003c/code\u003e before use.\u003c/p\u003e\n"]]],["ThemeColor provides a representation for a theme color. Key actions involve retrieving color information: `getColorType()` returns the color's type, and `getThemeColorType()` returns the specific theme color type. Both methods require authorization scopes `https://www.googleapis.com/auth/spreadsheets.currentonly` or `https://www.googleapis.com/auth/spreadsheets` to be used within scripts.\n"],null,["# Class ThemeColor\n\nThemeColor\n\nA representation for a theme color. \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------|-----------------------------------------------------------------------|------------------------------------------|\n| [getColorType()](#getColorType()) | [ColorType](../base/color-type.html) | Get the type of this color. |\n| [getThemeColorType()](#getThemeColorType()) | [ThemeColorType](/apps-script/reference/spreadsheet/theme-color-type) | Gets the theme color type of this color. |\n\nDetailed documentation\n----------------------\n\n### `get``Color``Type()`\n\nGet the type of this color.\n\n#### Return\n\n\n[ColorType](../base/color-type.html) --- The color type.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n### `get``Theme``Color``Type()`\n\nGets the theme color type of this color.\n\n#### Return\n\n\n[ThemeColorType](/apps-script/reference/spreadsheet/theme-color-type) --- The theme color type.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`"]]