既存のテーマにアクセスして変更する。スプレッドシートにテーマを設定するには、Spreadsheet.setSpreadsheetTheme(theme) を使用します。
メソッド
| メソッド | 戻り値の型 | 概要 |
|---|---|---|
get | Color | 有効なテーマカラータイプに固有の Color を返します。 |
get | String | テーマのフォント ファミリーを返します。null テーマの場合は null を返します。 |
get | Theme | 現在のテーマで使用可能なすべてのテーマカラー タイプのリストを返します。 |
set | Spreadsheet | このカラーパターンの Theme に関連付けられた具体的な色を指定の色に設定します。 |
set | Spreadsheet | このカラーパターンの Theme に関連付けられた具体的な色を、指定された色(RGB 形式)に設定します。 |
set | Spreadsheet | テーマのフォント ファミリーを設定します。 |
詳細なドキュメント
get Concrete Color(themeColorType)
有効なテーマカラータイプに固有の Color を返します。現在のテーマでテーマの色の種類が設定されていない場合は、例外をスローします。
パラメータ
| 名前 | 型 | 説明 |
|---|---|---|
theme | Theme | テーマの色のタイプ。 |
戻る
Color - コンクリートの色。
承認
このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Font Family()
テーマのフォント ファミリーを返します。null テーマの場合は null を返します。
戻る
String - テーマのフォント ファミリー。
承認
このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get Theme Colors()
現在のテーマで使用可能なすべてのテーマカラー タイプのリストを返します。
戻る
Theme - テーマカラーのリスト。
承認
このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Concrete Color(themeColorType, color)
このカラーパターンの Theme に関連付けられた具体的な色を指定の色に設定します。
パラメータ
| 名前 | 型 | 説明 |
|---|---|---|
theme | Theme | テーマのカラータイプ。 |
color | Color | 色。 |
戻る
Spreadsheet - テーマ(チェーン用)。
承認
このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Concrete Color(themeColorType, red, green, blue)
このカラーパターンの Theme に関連付けられた具体的な色を、指定された色(RGB 形式)に設定します。
パラメータ
| 名前 | 型 | 説明 |
|---|---|---|
theme | Theme | テーマのカラータイプ。 |
red | Integer | 赤色チャンネルの値。 |
green | Integer | 緑色チャンネルの値。 |
blue | Integer | 青色チャネルの値。 |
戻る
Spreadsheet - テーマ(チェーン用)。
承認
このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
set Font Family(fontFamily)
テーマのフォント ファミリーを設定します。
パラメータ
| 名前 | 型 | 説明 |
|---|---|---|
font | String | 新しいテーマ フォント ファミリー。 |
戻る
Spreadsheet - チェーン用のテーマ。
承認
このメソッドを使用するスクリプトには、次のスコープの 1 つ以上による承認が必要です。
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets