Class SpreadsheetTheme  |  Apps Script  |  Google for Developers (original) (raw)

Class SpreadsheetTheme

Stay organized with collections Save and categorize content based on your preferences.

Detailed documentation

getConcreteColor(themeColorType)

Returns the concrete [Color](/apps-script/reference/spreadsheet/color) for a valid theme color type. Throws exception if the theme color type is not set in the current theme.

Parameters

Name Type Description
themeColorType ThemeColorType Theme color type.

Return

[Color](/apps-script/reference/spreadsheet/color) — Concrete color.

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


getFontFamily()

Returns the font family of the theme, or null if it's a null theme.

Return

String — The theme font family.

Authorization

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


getThemeColors()

Returns a list of all possible theme color types for the current theme.

Return

[ThemeColorType[]](/apps-script/reference/spreadsheet/theme-color-type) — A list of theme colors.

Authorization

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


setConcreteColor(themeColorType, color)

Sets the concrete color associated with the [ThemeColorType](/apps-script/reference/spreadsheet/theme-color-type) in this color scheme to the given color.

Parameters

Name Type Description
themeColorType ThemeColorType The theme color type.
color Color The color.

Return

[SpreadsheetTheme](#) — The theme, for chaining.

Authorization

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


setConcreteColor(themeColorType, red, green, blue)

Sets the concrete color associated with the [ThemeColorType](/apps-script/reference/spreadsheet/theme-color-type) in this color scheme to the given color in RGB format.

Parameters

Name Type Description
themeColorType ThemeColorType The theme color type.
red Integer The value of red channel.
green Integer The value of green channel.
blue Integer The value of blue channel.

Return

[SpreadsheetTheme](#) — The theme, for chaining.

Authorization

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


setFontFamily(fontFamily)

Sets the font family for the theme.

Parameters

Name Type Description
fontFamily String The new theme font family.

Return

[SpreadsheetTheme](#) — This theme, for chaining.

Authorization

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

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.