SpreadsheetTheme

Access and modify existing themes. To set a theme on a spreadsheet, use `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet#setSpreadsheetTheme(SpreadsheetTheme)`.

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#getConcreteColor(ThemeColorType)` | `https://developers.google.com/apps-script/reference/spreadsheet/color` | Returns the concrete `https://developers.google.com/apps-script/reference/spreadsheet/color` for a valid theme color type. |
| `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#getFontFamily()` | `String|null` | Returns the font family of the theme, or `null` if it's a `null` theme. |
| `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#getThemeColors()` | `https://developers.google.com/apps-script/reference/spreadsheet/theme-color-type` | Returns a list of all possible theme color types for the current theme. |
| `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#setConcreteColor(ThemeColorType,Color)` | `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#` | Sets the concrete color associated with the `https://developers.google.com/apps-script/reference/spreadsheet/theme-color-type` in this color scheme to the given color. |
| `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#setConcreteColor(ThemeColorType,Integer,Integer,Integer)` | `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#` | Sets the concrete color associated with the `https://developers.google.com/apps-script/reference/spreadsheet/theme-color-type` in this color scheme to the given color in RGB format. |
| `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#setFontFamily(String)` | `https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#` | Sets the font family for the theme. |

## Detailed documentation

### `getConcreteColor(themeColorType)`

Returns the concrete `https://developers.google.com/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` | `https://developers.google.com/apps-script/reference/spreadsheet/theme-color-type` | Theme color type. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/color` --- Concrete color.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `getFontFamily()`

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

#### Return


`String|null` --- The theme font family.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `getThemeColors()`

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

#### Return


`https://developers.google.com/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](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `setConcreteColor(themeColorType, color)`

Sets the concrete color associated with the `https://developers.google.com/apps-script/reference/spreadsheet/theme-color-type` in this color scheme to the
given color.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `themeColorType` | `https://developers.google.com/apps-script/reference/spreadsheet/theme-color-type` | The theme color type. |
| `color` | `https://developers.google.com/apps-script/reference/spreadsheet/color` | The color. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#` --- The theme, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `setConcreteColor(themeColorType, red, green, blue)`

Sets the concrete color associated with the `https://developers.google.com/apps-script/reference/spreadsheet/theme-color-type` in this color scheme to the
given color in RGB format.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `themeColorType` | `https://developers.google.com/apps-script/reference/spreadsheet/theme-color-type` | 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


`https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#` --- The theme, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `setFontFamily(fontFamily)`

Sets the font family for the theme.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `fontFamily` | `String` | The new theme font family. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-theme#` --- This theme, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`